suppress_warnings.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // (C) Copyright Gennadiy Rozental 2001.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/test for the library home page.
  6. //
  7. //!@file
  8. //!@brief suppress some warnings
  9. // ***************************************************************************
  10. #ifdef BOOST_MSVC
  11. # pragma warning(push)
  12. # pragma warning(disable: 4511) // copy constructor can't not be generated
  13. # pragma warning(disable: 4512) // assignment operator can't not be generated
  14. # pragma warning(disable: 4100) // unreferenced formal parameter
  15. # pragma warning(disable: 4996) // <symbol> was declared deprecated
  16. # pragma warning(disable: 4355) // 'this' : used in base member initializer list
  17. # pragma warning(disable: 4706) // assignment within conditional expression
  18. # pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
  19. # pragma warning(disable: 4127) // conditional expression is constant
  20. # pragma warning(disable: 4290) // C++ exception specification ignored except to ...
  21. # pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
  22. # pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
  23. # pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
  24. # pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
  25. #endif
  26. #if defined(BOOST_CLANG) && (BOOST_CLANG == 1)
  27. # pragma clang diagnostic push
  28. # pragma clang diagnostic ignored "-Wvariadic-macros"
  29. # pragma clang diagnostic ignored "-Wmissing-declarations"
  30. #endif
  31. #if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
  32. # pragma GCC diagnostic push
  33. # pragma GCC diagnostic ignored "-Wvariadic-macros"
  34. # pragma GCC diagnostic ignored "-Wmissing-declarations"
  35. // # pragma GCC diagnostic ignored "-Wattributes"
  36. #endif