File indexing completed on 2025-01-18 09:40:54
0001 #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED
0002 #define BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #if defined( BOOST_STRICT_CONFIG ) || defined( BOOST_MP11_NO_WORKAROUNDS )
0014
0015 # define BOOST_MP11_WORKAROUND( symbol, test ) 0
0016
0017 #else
0018
0019 # define BOOST_MP11_WORKAROUND( symbol, test ) ((symbol) != 0 && ((symbol) test))
0020
0021 #endif
0022
0023
0024
0025 #define BOOST_MP11_CUDA 0
0026 #define BOOST_MP11_CLANG 0
0027 #define BOOST_MP11_INTEL 0
0028 #define BOOST_MP11_GCC 0
0029 #define BOOST_MP11_MSVC 0
0030
0031 #define BOOST_MP11_CONSTEXPR constexpr
0032
0033 #if defined( __CUDACC__ )
0034
0035
0036
0037 # undef BOOST_MP11_CUDA
0038 # define BOOST_MP11_CUDA (__CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__)
0039
0040
0041 # if defined(_MSC_VER) && (BOOST_MP11_CUDA < 9000000)
0042
0043 # define BOOST_MP11_NO_CONSTEXPR
0044
0045 # undef BOOST_MP11_CONSTEXPR
0046 # define BOOST_MP11_CONSTEXPR
0047
0048 # endif
0049
0050 #endif
0051
0052 #if defined(__clang__)
0053
0054
0055
0056 # undef BOOST_MP11_CLANG
0057 # define BOOST_MP11_CLANG (__clang_major__ * 100 + __clang_minor__)
0058
0059 # if defined(__has_cpp_attribute)
0060 # if __has_cpp_attribute(fallthrough) && __cplusplus >= 201406L
0061 # define BOOST_MP11_HAS_FOLD_EXPRESSIONS
0062 # endif
0063 # endif
0064
0065 #if BOOST_MP11_CLANG < 400 && __cplusplus >= 201402L \
0066 && defined( __GLIBCXX__ ) && !__has_include(<shared_mutex>)
0067
0068
0069
0070
0071 extern "C" char *gets (char *__s);
0072 #endif
0073
0074 #elif defined(__INTEL_COMPILER)
0075
0076
0077
0078 # undef BOOST_MP11_INTEL
0079 # define BOOST_MP11_INTEL __INTEL_COMPILER
0080
0081 #elif defined(__GNUC__)
0082
0083
0084
0085 # undef BOOST_MP11_GCC
0086 # define BOOST_MP11_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
0087
0088 #elif defined(_MSC_VER)
0089
0090
0091
0092 # undef BOOST_MP11_MSVC
0093 # define BOOST_MP11_MSVC _MSC_VER
0094
0095 # if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 )
0096 # define BOOST_MP11_NO_CONSTEXPR
0097 # endif
0098
0099 #if _MSC_FULL_VER < 190024210
0100 # undef BOOST_MP11_CONSTEXPR
0101 # define BOOST_MP11_CONSTEXPR
0102 #endif
0103
0104 #endif
0105
0106
0107
0108 #if !defined(BOOST_MP11_NO_CONSTEXPR) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304
0109 # define BOOST_MP11_HAS_CXX14_CONSTEXPR
0110 #endif
0111
0112
0113
0114 #if !defined(BOOST_MP11_HAS_FOLD_EXPRESSIONS) && defined(__cpp_fold_expressions) && __cpp_fold_expressions >= 201603
0115 # define BOOST_MP11_HAS_FOLD_EXPRESSIONS
0116 #endif
0117
0118
0119
0120 #if defined(__has_builtin)
0121 # if __has_builtin(__type_pack_element)
0122 # define BOOST_MP11_HAS_TYPE_PACK_ELEMENT
0123 # endif
0124 #endif
0125
0126
0127
0128 #if defined(__cpp_nontype_template_parameter_auto) && __cpp_nontype_template_parameter_auto >= 201606L
0129 # define BOOST_MP11_HAS_TEMPLATE_AUTO
0130 #endif
0131
0132 #if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 )
0133
0134 # undef BOOST_MP11_HAS_TEMPLATE_AUTO
0135 #endif
0136
0137
0138
0139 #if BOOST_MP11_WORKAROUND( BOOST_MP11_CLANG, < 304 )
0140 # define BOOST_MP11_DEPRECATED(msg)
0141 #elif defined(__GNUC__) || defined(__clang__)
0142 # define BOOST_MP11_DEPRECATED(msg) __attribute__((deprecated(msg)))
0143 #elif defined(_MSC_VER) && _MSC_VER >= 1900
0144 # define BOOST_MP11_DEPRECATED(msg) [[deprecated(msg)]]
0145 #else
0146 # define BOOST_MP11_DEPRECATED(msg)
0147 #endif
0148
0149 #endif