Whenever I include boost in my project I get a million of these warnings. Does anyone know how I can get rid of the warnings?
../depends\boost/config/abi_prefix.hpp(19) : warning C4103: 'depends\boost\config\abi_prefix.hpp' : alignment changed after including header, may be due to missing #pragma pack(pop)
I know I can do a #pragma to disable the warning, but I'd like to know the reason for these warnings.
The reason is that boost doesn't push/pop these pragmas in every file that needs data to be packed. They #include a separate file which does the push (abi_prefix.hpp), and then another (abo_suffix.hp) afterwards which does the pop.
That allows them to reuse the same #pragma pack code everywhere, which is handy as it may vary between compilers.
It's perfectly safe though. The #pragma push is followed by a pop, it's just included from a different file. So you should probably just disable that error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With