header.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. // qualifier applied to function type has no meaning; ignored
  28. #pragma warning(disable: 4180)
  29. // qualifier applied to reference type; ignored
  30. #pragma warning(disable: 4181)
  31. #elif (defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) \
  32. && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406) || defined(__clang__)
  33. // Note: clang-cl goes here as well, as it seems to support gcc-style warning control pragmas.
  34. #pragma GCC diagnostic push
  35. // unused parameter 'arg'
  36. #pragma GCC diagnostic ignored "-Wunused-parameter"
  37. // unused function 'foo'
  38. #pragma GCC diagnostic ignored "-Wunused-function"
  39. #if defined(__clang__)
  40. // template argument uses unnamed type
  41. #pragma clang diagnostic ignored "-Wunnamed-type-template-args"
  42. #endif // defined(__clang__)
  43. #endif
  44. #endif // !defined(BOOST_FILESYSTEM_ENABLE_WARNINGS)