config.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
  2. #define BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
  3. // Copyright 2018 Peter Dimov
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // See http://www.boost.org/libs/system for documentation.
  9. #include <boost/config.hpp>
  10. #include <boost/config/workaround.hpp>
  11. // BOOST_SYSTEM_HAS_SYSTEM_ERROR
  12. #if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
  13. # define BOOST_SYSTEM_HAS_SYSTEM_ERROR
  14. #endif
  15. #if BOOST_WORKAROUND(BOOST_GCC, < 40600)
  16. // g++ 4.4's <map> is not good enough
  17. # undef BOOST_SYSTEM_HAS_SYSTEM_ERROR
  18. #endif
  19. #if defined(BOOST_NO_CXX11_HDR_MUTEX)
  20. // Required for thread-safe map manipulation
  21. # undef BOOST_SYSTEM_HAS_SYSTEM_ERROR
  22. #endif
  23. // BOOST_SYSTEM_NOEXCEPT
  24. // Retained for backward compatibility
  25. #define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
  26. // BOOST_SYSTEM_HAS_CONSTEXPR
  27. #if !defined(BOOST_NO_CXX14_CONSTEXPR)
  28. # define BOOST_SYSTEM_HAS_CONSTEXPR
  29. #endif
  30. #if BOOST_WORKAROUND(BOOST_GCC, < 60000)
  31. # undef BOOST_SYSTEM_HAS_CONSTEXPR
  32. #endif
  33. #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
  34. # define BOOST_SYSTEM_CONSTEXPR constexpr
  35. #else
  36. # define BOOST_SYSTEM_CONSTEXPR
  37. #endif
  38. // BOOST_SYSTEM_DEPRECATED
  39. #if defined(__clang__)
  40. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
  41. #elif defined(__GNUC__)
  42. # if __GNUC__ * 100 + __GNUC_MINOR__ >= 405
  43. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated(msg)))
  44. # else
  45. # define BOOST_SYSTEM_DEPRECATED(msg) __attribute__((deprecated))
  46. # endif
  47. #elif defined(_MSC_VER)
  48. # define BOOST_SYSTEM_DEPRECATED(msg) __declspec(deprecated(msg))
  49. #else
  50. # define BOOST_SYSTEM_DEPRECATED(msg)
  51. #endif
  52. #endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED