Angus Leeming <[EMAIL PROTECTED]> writes:

| Testing this out on:
| * an x86 box running Windows and compiling with MSVC2005
| * an x86 box running Linux and compiling with g++ 4.0.2
| * a 64 bit Dec Alpha box running Linux and compiling with g++ 4.0.3
| 
| All three produce the output:
| sizeof(bool) == 1
| sizeof(int)  == 4
| 
| Somewhat freakily, I have the distinct memory that sizeof(bool) on a 64 bit 
Dec
| Alpha running tru64 unix and compiling with cxx produced sizeof(bool) == 4.

The c++ standard (and C99) requires sizeof(bool) == 1.

But pre-standardization it was (is) not uncommon to map bool to
int/unsigned int.

-- 
        Lgb

Reply via email to