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