Is there a way to disable all warnings with a pragma?

You can push/pop a low level of warning, like this:

#pragma warning(push, 0)        

#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
// ...

#pragma warning(pop)

But know that it’s not possible to disable all warnings. For example, some linker warnings are impossible to turn off.

Leave a Comment