header.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright Andrey Semashev 2021.
  3. * Distributed under the Boost Software License, Version 1.0.
  4. * (See accompanying file LICENSE_1_0.txt or copy at
  5. * http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #include <boost/config/abi_prefix.hpp>
  8. #if !defined(BOOST_FILESYSTEM_ENABLE_WARNINGS)
  9. #if defined(_MSC_VER) && !defined(__clang__)
  10. #pragma warning(push, 3)
  11. // 'm_A' : class 'A' needs to have dll-interface to be used by clients of class 'B'
  12. #pragma warning(disable: 4251)
  13. // non dll-interface class 'A' used as base for dll-interface class 'B'
  14. #pragma warning(disable: 4275)
  15. // 'int' : forcing value to bool 'true' or 'false' (performance warning)
  16. #pragma warning(disable: 4800)
  17. // unreferenced formal parameter
  18. #pragma warning(disable: 4100)
  19. // conditional expression is constant
  20. #pragma warning(disable: 4127)
  21. // function marked as __forceinline not inlined
  22. #pragma warning(disable: 4714)
  23. // decorated name length exceeded, name was truncated
  24. #pragma warning(disable: 4503)
  25. // 'X': This function or variable may be unsafe. Consider using Y instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  26. #pragma warning(disable: 4996)
  27. #elif (defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) \
  28. && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406) || defined(__clang__)
  29. // Note: clang-cl goes here as well, as it seems to support gcc-style warning control pragmas.
  30. #pragma GCC diagnostic push
  31. // unused parameter 'arg'
  32. #pragma GCC diagnostic ignored "-Wunused-parameter"
  33. #endif
  34. #endif // !defined(BOOST_FILESYSTEM_ENABLE_WARNINGS)