cxx03_warn.hpp 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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/math/tools/config.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_CONSTEXPR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  53. # define BOOST_MATH_SHOW_CXX03_WARNING
  54. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_CONSTEXPR"
  55. #endif
  56. #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  57. # define BOOST_MATH_SHOW_CXX03_WARNING
  58. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NULLPTR"
  59. #endif
  60. #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  61. # define BOOST_MATH_SHOW_CXX03_WARNING
  62. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_NUMERIC_LIMITS"
  63. #endif
  64. #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  65. # define BOOST_MATH_SHOW_CXX03_WARNING
  66. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_DECLTYPE"
  67. #endif
  68. #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  69. # define BOOST_MATH_SHOW_CXX03_WARNING
  70. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_HDR_ARRAY"
  71. #endif
  72. #if defined(BOOST_NO_CXX11_ALLOCATOR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  73. # define BOOST_MATH_SHOW_CXX03_WARNING
  74. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_ALLOCATOR"
  75. #endif
  76. #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
  77. # define BOOST_MATH_SHOW_CXX03_WARNING
  78. # define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS"
  79. #endif
  80. #ifdef BOOST_MATH_SHOW_CXX03_WARNING
  81. //
  82. // The above list includes everything we use, plus a few we're likely to use soon.
  83. // As from March 2020, C++03 support is deprecated, and as from March 2021 will be removed,
  84. // so mark up as such:
  85. //
  86. // March 2021(mborland): C++03 support has been removed. Replace warning with hard error.
  87. //
  88. #error Support for C++03 has been removed. The minimum requirement for this library is fully compliant C++11.
  89. #endif
  90. #endif