Warning, file /include/cryptopp/config_cxx.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef CRYPTOPP_CONFIG_CXX_H
0030 #define CRYPTOPP_CONFIG_CXX_H
0031
0032 #include "config_os.h"
0033 #include "config_cpu.h"
0034 #include "config_ver.h"
0035
0036
0037 #include <string>
0038 #include <exception>
0039
0040
0041
0042 #if (defined(CRYPTOPP_MSC_VERSION) && CRYPTOPP_MSC_VERSION <= 1300) || \
0043 defined(__MWERKS__) || \
0044 (defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x450) || defined(_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)) || \
0045 (__cplusplus >= 202002L))
0046 #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
0047 #endif
0048
0049
0050 #ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
0051 # define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE 1
0052 # define CRYPTOPP_CXX98_UNCAUGHT_EXCEPTION 1
0053 #endif
0054
0055
0056 #ifndef __has_feature
0057 # define __has_feature(x) 0
0058 #endif
0059
0060
0061 #if ((CRYPTOPP_MSC_VERSION >= 1600) || (__cplusplus >= 201103L)) && !defined(_STLPORT_VERSION)
0062 # define CRYPTOPP_CXX11 1
0063 #endif
0064
0065
0066
0067
0068
0069
0070
0071 #if defined(__APPLE__) && defined(__clang__)
0072 # if !(defined(__has_include) && __has_include(<forward_list>))
0073 # undef CRYPTOPP_CXX11
0074 # endif
0075 #endif
0076
0077
0078 #if defined(CRYPTOPP_CXX11) && !defined(CRYPTOPP_NO_CXX14)
0079 # if ((CRYPTOPP_MSC_VERSION >= 1900) || (__cplusplus >= 201402L)) && !defined(_STLPORT_VERSION)
0080 # define CRYPTOPP_CXX14 1
0081 # endif
0082 #endif
0083
0084
0085 #if defined(CRYPTOPP_CXX14) && !defined(CRYPTOPP_NO_CXX17)
0086 # if ((CRYPTOPP_MSC_VERSION >= 1900) || (__cplusplus >= 201703L)) && !defined(_STLPORT_VERSION)
0087 # define CRYPTOPP_CXX17 1
0088 # endif
0089 #endif
0090
0091
0092
0093 #if defined(CRYPTOPP_CXX11)
0094
0095
0096 #if (CRYPTOPP_MSC_VERSION >= 1700) || __has_feature(cxx_atomic) || \
0097 (__INTEL_COMPILER >= 1300) || (CRYPTOPP_GCC_VERSION >= 40400) || (__SUNPRO_CC >= 0x5140)
0098 # define CRYPTOPP_CXX11_ATOMIC 1
0099 #endif
0100
0101
0102
0103 #if (CRYPTOPP_MSC_VERSION >= 1700) || (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || \
0104 (CRYPTOPP_APPLE_CLANG_VERSION >= 50000) || (__INTEL_COMPILER >= 1200) || \
0105 (CRYPTOPP_GCC_VERSION >= 40400) || (__SUNPRO_CC >= 0x5130)
0106
0107
0108
0109
0110
0111 # include <cstddef>
0112 # if !defined(__GLIBCXX__) || defined(_GLIBCXX_HAS_GTHREADS)
0113 # define CRYPTOPP_CXX11_SYNCHRONIZATION 1
0114 # endif
0115 #endif
0116
0117
0118
0119
0120
0121
0122 #if (__cpp_threadsafe_static_init >= 200806) || \
0123 (CRYPTOPP_MSC_VERSION >= 1900) && ((WINVER >= 0x0600) || (_WIN32_WINNT >= 0x0600)) || \
0124 (CRYPTOPP_LLVM_CLANG_VERSION >= 20900) || (CRYPTOPP_APPLE_CLANG_VERSION >= 40000) || \
0125 (__INTEL_COMPILER >= 1110) || (CRYPTOPP_GCC_VERSION >= 40300) || (__SUNPRO_CC >= 0x5130)
0126 # define CRYPTOPP_CXX11_STATIC_INIT 1
0127 #endif
0128
0129
0130 #if (CRYPTOPP_MSC_VERSION >= 1800) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20900) || \
0131 (CRYPTOPP_APPLE_CLANG_VERSION >= 40000) || (__INTEL_COMPILER >= 1210) || \
0132 (CRYPTOPP_GCC_VERSION >= 40300) || (__SUNPRO_CC >= 0x5130)
0133 # define CRYPTOPP_CXX11_DELETED_FUNCTIONS 1
0134 #endif
0135
0136
0137 #if (CRYPTOPP_MSC_VERSION >= 1900) || __has_feature(cxx_alignas) || \
0138 (__INTEL_COMPILER >= 1500) || (CRYPTOPP_GCC_VERSION >= 40800) || (__SUNPRO_CC >= 0x5130)
0139 # define CRYPTOPP_CXX11_ALIGNAS 1
0140 #endif
0141
0142
0143 #if (CRYPTOPP_MSC_VERSION >= 1900) || __has_feature(cxx_alignof) || \
0144 (__INTEL_COMPILER >= 1500) || (CRYPTOPP_GCC_VERSION >= 40500) || (__SUNPRO_CC >= 0x5130)
0145 # define CRYPTOPP_CXX11_ALIGNOF 1
0146 #endif
0147
0148
0149 #if (CRYPTOPP_MSC_VERSION >= 1800) || (CRYPTOPP_LLVM_CLANG_VERSION >= 30100) || \
0150 (CRYPTOPP_APPLE_CLANG_VERSION >= 40000) || (__INTEL_COMPILER >= 1400) || \
0151 (CRYPTOPP_GCC_VERSION >= 40400) || (__SUNPRO_CC >= 0x5130)
0152 # define CRYPTOPP_CXX11_INITIALIZER_LIST 1
0153 #endif
0154
0155
0156 #if (CRYPTOPP_MSC_VERSION >= 1700) || __has_feature(cxx_lambdas) || \
0157 (__INTEL_COMPILER >= 1200) || (CRYPTOPP_GCC_VERSION >= 40900) || (__SUNPRO_CC >= 0x5140)
0158 # define CRYPTOPP_CXX11_LAMBDA 1
0159 #endif
0160
0161
0162 #if (CRYPTOPP_MSC_VERSION >= 1900) || __has_feature(cxx_noexcept) || \
0163 (__INTEL_COMPILER >= 1400) || (CRYPTOPP_GCC_VERSION >= 40600) || (__SUNPRO_CC >= 0x5130)
0164 # define CRYPTOPP_CXX11_NOEXCEPT 1
0165 #endif
0166
0167
0168 #if (__cpp_variadic_templates >= 200704) || __has_feature(cxx_variadic_templates) || \
0169 (CRYPTOPP_MSC_VERSION >= 1800) || (__INTEL_COMPILER >= 1210) || \
0170 (CRYPTOPP_GCC_VERSION >= 40300) || (__SUNPRO_CC >= 0x5130)
0171 # define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
0172 #endif
0173
0174
0175
0176 #if (__cpp_constexpr >= 200704) || __has_feature(cxx_constexpr) || \
0177 (CRYPTOPP_MSC_VERSION >= 1900) || (__INTEL_COMPILER >= 1600) || \
0178 (CRYPTOPP_GCC_VERSION >= 40600) || (__SUNPRO_CC >= 0x5130)
0179 # define CRYPTOPP_CXX11_CONSTEXPR 1
0180 #endif
0181
0182
0183
0184 #if (CRYPTOPP_MSC_VERSION >= 1700) || __has_feature(cxx_strong_enums) || \
0185 (__INTEL_COMPILER >= 1400) || (CRYPTOPP_GCC_VERSION >= 40400) || (__SUNPRO_CC >= 0x5120)
0186 # define CRYPTOPP_CXX11_STRONG_ENUM 1
0187 #endif
0188
0189
0190 #if (CRYPTOPP_MSC_VERSION >= 1600) || __has_feature(cxx_nullptr) || \
0191 (__INTEL_COMPILER >= 1000) || (CRYPTOPP_GCC_VERSION >= 40600) || \
0192 (__SUNPRO_CC >= 0x5130) || defined(__IBMCPP_NULLPTR)
0193 # define CRYPTOPP_CXX11_NULLPTR 1
0194 #endif
0195
0196 #endif
0197
0198
0199
0200 #if defined(CRYPTOPP_CXX14)
0201
0202
0203
0204 #if (__cpp_static_assert >= 201411)
0205 # define CRYPTOPP_CXX17_STATIC_ASSERT 1
0206 #endif
0207
0208 #endif
0209
0210
0211
0212
0213 #if defined(CRYPTOPP_CXX17)
0214
0215
0216
0217
0218
0219
0220 #if defined(__clang__)
0221 # if __EXCEPTIONS && __has_feature(cxx_exceptions)
0222 # if __cpp_lib_uncaught_exceptions >= 201411L
0223 # define CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS 1
0224 # endif
0225 # endif
0226 #elif (CRYPTOPP_MSC_VERSION >= 1900) || (__INTEL_COMPILER >= 1800) || \
0227 (CRYPTOPP_GCC_VERSION >= 60000) || (__cpp_lib_uncaught_exceptions >= 201411L)
0228 # define CRYPTOPP_CXX17_UNCAUGHT_EXCEPTIONS 1
0229 #endif
0230
0231 #endif
0232
0233
0234
0235 #if defined(CRYPTOPP_CXX11_NOEXCEPT)
0236 # define CRYPTOPP_THROW noexcept(false)
0237 # define CRYPTOPP_NO_THROW noexcept(true)
0238 #else
0239 # define CRYPTOPP_THROW
0240 # define CRYPTOPP_NO_THROW
0241 #endif
0242
0243
0244 #if defined(CRYPTOPP_CXX11_NULLPTR) && !defined(NULLPTR)
0245 # define NULLPTR nullptr
0246 #elif !defined(NULLPTR)
0247 # define NULLPTR NULL
0248 #endif
0249
0250 #endif