disable_warnings.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // disable_warnings.hpp --------------------------------------------------------------//
  2. // Copyright Beman Dawes 2011
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See http://www.boost.org/LICENSE_1_0.txt
  5. //--------------------------------------------------------------------------------------//
  6. #ifdef _MSC_VER
  7. #ifndef _SCL_SECURE_NO_WARNINGS
  8. # define _SCL_SECURE_NO_WARNINGS
  9. #endif
  10. #ifndef _CRT_SECURE_NO_WARNINGS
  11. # define _CRT_SECURE_NO_WARNINGS
  12. #endif
  13. # pragma warning(push)
  14. // triggered by boost/detail/lightweight_test.hpp
  15. # pragma warning( disable : 4640 ) // ... construction of local static object is not thread-safe
  16. // triggered by Microsoft's own headers, so disable
  17. # pragma warning( disable : 4820 ) // padding added after data member
  18. # pragma warning( disable : 4548 ) // expression before comma has no effect
  19. # pragma warning( disable : 4668 ) // ... is not defined as a preprocessor macro
  20. # pragma warning( disable : 4514 ) // ... unreferenced inline function has been removed
  21. # pragma warning( disable : 4710 ) // ... function not inlined
  22. # pragma warning( disable : 4986 ) // ... exception specification does not match previous declaration
  23. # pragma warning( disable : 4711 ) // ... selected for automatic inline expansion
  24. #endif