Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Yes but there is still the problem of this.As you can see they are part of the Standard.
Which means they equally may not be packed to share and straddle the individual bytes.Adjacent bit field members may be packed to share and straddle the individual bytes.
From C++03, 9.6 Bitfields (pg. 163):
Allocation of bit-fields within a class object is implementation-defined. Alignment of bit-fields is implementation-defined. Bit-fields are packed into some addressable allocation unit. [Note:bit-fields straddle allocation units on some machines and not on others. Bit-fields are assigned right-to-left on some machines, left-to-right on others. ]
struct s{
int i;
bool b;
};
std::cout << sizeof(s);
will print 4/8 even on GCC. Seems that if you only store bool in struct, it will inline into 1 for some reason(Too lazy to go through the monster standard)Because those "better Open Source compilers" are a pain to use on Windows. GCC is designed for Linux so although ports for Windows do exist they either depend on Linux simulation (mingw) or they are a usability nightmare. Visual C++ also has amazing interactive debug support (no command line nonsense). I am unsure if that needs the compiler or not however.Btw. why do you even use MSVC if there are better Open Source compilers? Microsoft products are commonly known for not working as expected.
Next version of MSVC supports C++11.Just look at this: http://stackoverflow.com/questions/1...c11-on-windows
