boostorg / throw_exception

Common infrastructure for throwing exceptions
https://boost.org/libs/throw_exception
14 stars 46 forks source link

Don't include stuff inside #pragma warning push/pop, include boost/config.hpp before testing BOOST_ macros. #6

Closed pgroke-dt closed 6 years ago

pgroke-dt commented 7 years ago

I've moved some #include lines around + added #include <boost/config.hpp> lines to some files to avoid...

We're building with warnings=errors, and including e.g. <boost/config.hpp> for the first time inside a #pragma warning push/pop pair means all #pragma warning disable that are done in config.hpp will be undone by the pop. Which means our builds will fail because of some upgraded warning. Also I think it's generally not a good idea to include files inside a #pragma warning push/pop pair.

And of course every file that tests/uses some BOOST_* macro should include <boost/config.hpp> first, to e.g. give Boost.Config and/or <config/user.hpp> the change to define that macro.