[Solved] sizeof(bool) g++ vs vc++ [duplicate]


There are versions of g++ (and versions of Visual C++ as well for that matter) for which on some platforms sizeof(bool) is not equal to 1. So no, you can’t assume that it will be the same on g++ and Visual C++. You can’t even assume that it’s the same on different versions of the same compiler or the same version on different platforms.

8

solved sizeof(bool) g++ vs vc++ [duplicate]