cxx03_warn.hpp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // Copyright (c) 2020 John Maddock
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_MATH_TOOLS_CXX03_WARN_HPP
  6. #define BOOST_MATH_TOOLS_CXX03_WARN_HPP
  7. #include <boost/config/pragma_message.hpp>
  8. #if defined(BOOST_NO_CXX11_NOEXCEPT)
  9. # define BOOST_MATH_SHOW_CXX03_WARNING
  10. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NOEXCEPT"
  11. #endif
  12. #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  13. # define BOOST_MATH_SHOW_CXX03_WARNING
  14. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NOEXCEPT"
  15. #endif
  16. #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  17. # define BOOST_MATH_SHOW_CXX03_WARNING
  18. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NOEXCEPT"
  19. #endif
  20. #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  21. # define BOOST_MATH_SHOW_CXX03_WARNING
  22. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_RVALUE_REFERENCES"
  23. #endif
  24. #if defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  25. # define BOOST_MATH_SHOW_CXX03_WARNING
  26. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_SFINAE_EXPR"
  27. #endif
  28. #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  29. # define BOOST_MATH_SHOW_CXX03_WARNING
  30. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_AUTO_DECLARATIONS"
  31. #endif
  32. #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  33. # define BOOST_MATH_SHOW_CXX03_WARNING
  34. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_LAMBDAS"
  35. #endif
  36. #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  37. # define BOOST_MATH_SHOW_CXX03_WARNING
  38. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX"
  39. #endif
  40. #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  41. # define BOOST_MATH_SHOW_CXX03_WARNING
  42. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_HDR_TUPLE"
  43. #endif
  44. #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  45. # define BOOST_MATH_SHOW_CXX03_WARNING
  46. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_HDR_INITIALIZER_LIST"
  47. #endif
  48. #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  49. # define BOOST_MATH_SHOW_CXX03_WARNING
  50. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_HDR_CHRONO"
  51. #endif
  52. #if defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  53. # define BOOST_MATH_SHOW_CXX03_WARNING
  54. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_THREAD_LOCAL"
  55. #endif
  56. #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  57. # define BOOST_MATH_SHOW_CXX03_WARNING
  58. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_CONSTEXPR"
  59. #endif
  60. #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  61. # define BOOST_MATH_SHOW_CXX03_WARNING
  62. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NULLPTR"
  63. #endif
  64. #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  65. # define BOOST_MATH_SHOW_CXX03_WARNING
  66. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NUMERIC_LIMITS"
  67. #endif
  68. #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  69. # define BOOST_MATH_SHOW_CXX03_WARNING
  70. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_DECLTYPE"
  71. #endif
  72. #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  73. # define BOOST_MATH_SHOW_CXX03_WARNING
  74. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_HDR_ARRAY"
  75. #endif
  76. #if defined(BOOST_NO_CXX11_HDR_ATOMIC) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  77. # define BOOST_MATH_SHOW_CXX03_WARNING
  78. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_HDR_ATOMIC"
  79. #endif
  80. #if defined(BOOST_NO_CXX11_ALLOCATOR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  81. # define BOOST_MATH_SHOW_CXX03_WARNING
  82. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_ALLOCATOR"
  83. #endif
  84. #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  85. # define BOOST_MATH_SHOW_CXX03_WARNING
  86. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS"
  87. #endif
  88. #ifdef BOOST_MATH_SHOW_CXX03_WARNING
  89. //
  90. // The above list includes everything we use, plus a few we're likely to use soon.
  91. // As from March 2020, C++03 support is deprecated, and as from March 2021 will be removed,
  92. // so mark up as such:
  93. //
  94. #if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(BOOST_MATH_DISABLE_DEPRECATED_03_WARNING)
  95. BOOST_PRAGMA_MESSAGE("CAUTION: One or more C++11 features were found to be unavailable")
  96. BOOST_PRAGMA_MESSAGE("CAUTION: Compiling Boost.Math in pre-C++11 conformance modes is now deprecated and will be removed from March 2021.")
  97. BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_MATH_DISABLE_DEPRECATED_03_WARNING to suppress this message.")
  98. BOOST_PRAGMA_MESSAGE("CAUTION: This message was generated due to the define: " BOOST_MATH_CXX03_WARN_REASON)
  99. #endif
  100. #endif
  101. #endif