Question/problem related to _Bool in type_traits.h

Stephen M. Webb stephen@bregmasoft.com
Tue Oct 16 06:41:00 GMT 2001


On Mon, 15 Oct 2001, Ira Ruben wrote:
>
> Does anyone have a suggested (permanent) fix for this problem.  For 
> the time being I've added a #undef _Bool just before the template 
> definition in type_traits.h.

Oh yeah, the dangers of using the C preprocessor.

I would also change _Bool in type_traits.h to have some other name, since
I've seen a boatload of code, albiet illegally, that uses _Bool.  Since the name
_Bool as used in type_traits is internal to that file and really means
_HasTrait, it's easy enough and safe enough to just rename the symbol.

__
Stephen M. Webb



More information about the Libstdc++ mailing list