summaryrefslogtreecommitdiff
path: root/config_cxx.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-07-22 01:08:12 -0400
committerJeffrey Walton <noloader@gmail.com>2019-07-22 01:08:12 -0400
commit9d2cab754811a973d4a29882291479540b424095 (patch)
tree77f298bfa0021f0086b9cd628e56a2e3191a230d /config_cxx.h
parenta7f2796ddad32f1a6a92769a0712ead7e4271939 (diff)
downloadcryptopp-git-9d2cab754811a973d4a29882291479540b424095.tar.gz
Add CRYPTOPP_CXX14 define
Diffstat (limited to 'config_cxx.h')
-rw-r--r--config_cxx.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/config_cxx.h b/config_cxx.h
index 9aada65f..17b2fd0c 100644
--- a/config_cxx.h
+++ b/config_cxx.h
@@ -68,8 +68,15 @@
# endif
#endif
+// C++14 macro version, https://stackoverflow.com/q/26089319/608639
+#if defined(CRYPTOPP_CXX11) && !defined(CRYPTOPP_NO_CXX14)
+# if ((_MSC_VER >= 1900) || (__cplusplus >= 201402L)) && !defined(_STLPORT_VERSION)
+# define CRYPTOPP_CXX14 1
+# endif
+#endif
+
// C++17 macro version, https://stackoverflow.com/q/38456127/608639
-#if defined(CRYPTOPP_CXX11) && !defined(CRYPTOPP_NO_CXX17)
+#if defined(CRYPTOPP_CXX14) && !defined(CRYPTOPP_NO_CXX17)
# if ((_MSC_VER >= 1900) || (__cplusplus >= 201703L)) && !defined(_STLPORT_VERSION)
# define CRYPTOPP_CXX17 1
# endif
@@ -176,11 +183,16 @@
// ***************** C++14 and above ********************
+#if defined(CRYPTOPP_CXX14)
+
// Extended static_assert with one argument
+// Microsoft cannot handle the single argument static_assert as of VS2019 (cl.exe 19.00)
#if (__cpp_static_assert >= 201411)
# define CRYPTOPP_CXX14_STATIC_ASSERT 1
#endif // static_assert
+#endif
+
// ***************** C++17 and above ********************
// C++17 is available