[PATCH] assert: Support types without operator== (int) [BZ #21972]

Paul Eggert eggert@cs.ucla.edu
Fri Aug 18 15:34:00 GMT 2017


Florian Weimer wrote:
> +  ((void) sizeof (static_cast<bool> (expr)), __extension__ ({		\

Can we instead replace 'sizeof ((expr) == 0)' with 'sizeof !(expr)'? That works 
in C, and if it also works in C++ it would avoid the need for the #ifdef 
__cplusplus.



More information about the Libc-alpha mailing list