diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-03-20 16:07:53 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-03-20 16:07:53 -0400 |
commit | f845316e9586423bc1b399267be2c882d0f3844e (patch) | |
tree | bda1dab884e7069c6588afd592d68751c38bab21 /config_cxx.h | |
parent | a3224bf4453147438d73d2959bdfe7aeab41ddb0 (diff) | |
download | cryptopp-git-f845316e9586423bc1b399267be2c882d0f3844e.tar.gz |
Cleanup C++11 compile when CRYPTOPP_NO_CXX11 is in effect
Diffstat (limited to 'config_cxx.h')
-rw-r--r-- | config_cxx.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config_cxx.h b/config_cxx.h index 7afa0759..62c17c4d 100644 --- a/config_cxx.h +++ b/config_cxx.h @@ -241,7 +241,14 @@ // ***************** C++ fixups ********************
-#if defined(CRYPTOPP_CXX11_NOEXCEPT)
+// Testing with -DCRYPTOPP_NO_CXX11 causes a lot of noise
+// Grab this one C++11 feature for a sane compile.
+#if (CRYPTOPP_MSC_VERSION >= 1900) || __has_feature(cxx_noexcept) || \
+ (__INTEL_COMPILER >= 1400) || (CRYPTOPP_GCC_VERSION >= 40600) || (__SUNPRO_CC >= 0x5130)
+# define CRYPTOPP_CXX11_ALT_NOEXCEPT 1
+#endif // noexcept compilers
+
+#if defined(CRYPTOPP_CXX11_NOEXCEPT) || defined(CRYPTOPP_CXX11_ALT_NOEXCEPT)
# define CRYPTOPP_THROW noexcept(false)
# define CRYPTOPP_NO_THROW noexcept(true)
#else
|