I compile with /Wall which causes Boost to generate all sorts of warnings. Furthermore, I instruct the compiler to treat all warnings as errors, so it becomes necessary to have no warnings at all.
In order to avoid getting any warnings while compiling the Boost headers, I use #pragma warning to temporarily lower the warning level as low as possible and turn off any remaining warnings while processing the Boost headers:
// set minimal warning level #pragma warning(push,0) // some warnings still occur at this level // if necessary, disable specific warnings not covered by previous pragma #pragma warning(disable:4800) #include // restore warning level #pragma warning(pop)
This makes sure my code is compiled with the highest level of error checking possible while code the I have no control over can still compile successfully.
The only other options I can see are to ignore the warnings or maintain a patched version of the Boost code until those warnings are fixed, neither of which is very appealing.