Where in the C++ Standard does it say that sizeof(wchar_t) <= sizeof(long) and sizeof(bool) <= sizeof(long)?

Viewed 341

Mr. Stroustrup wrote the following on page 149 of his new book (TCPL 4th edition)

1 <= sizeof(wchar_t) <= sizeof(long)

I couldn't find anything in the Standard supporting the last inequality above. I could say the same for sizeof(bool) <= sizeof(long).

Edit: In 3.9.1p5 you'll find:

Type wchar_t shall have the same size, signedness, and alignment requirements (3.11) as one of the other integral types, called its underlying type.

which gives support to the inequality

sizeof(wchar_t) <= sizeof(long long)

but not to

sizeof(wchar_t) <= sizeof(long)

But I couldn't find anything confirming

sizeof(bool) <= sizeof(long)
1 Answers
Related