J
James Kuyper
It is actually a macro, it's explicity mentioned in the standard to be
so.
See 7.16 p 2
You're right - my mistake. But I mis-remembered it as a standard typedef
because it makes more sense to me that it would be a typedef. Does
anyone know why it's a macro? I suppose it might be because you can
#undef a macro, but you can't turn off a typedef. If you want to use
'bool' as the standard macro in one part of a translation unit, and as a
user-defined identifier with an incompatible meaning from legacy code in
a later part of the same translation unit, making 'bool' a macro allows
you do so. But that seems like too convoluted a motivation for such a
choice.