aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2020-11-15 11:14:12 +0900
committerMITSUNARI Shigeo <[email protected]>2020-11-15 11:14:12 +0900
commita49c4bc11bd86ad05cdb321442bef3421322fd22 (patch)
tree85d1b950d3c9262805aeda959acf8e08a9bc8dea
parent70777a69937b1ddd588e0c24091c0fd1781c0897 (diff)
downloadxbyak-a49c4bc11bd86ad05cdb321442bef3421322fd22.tar.gz
xbyak-a49c4bc11bd86ad05cdb321442bef3421322fd22.zip
disable XBYAK_CONSTEXPR for g++-5 -std=c++-14
-rw-r--r--xbyak/xbyak.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 5d959e0..44f7790 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -117,8 +117,11 @@
#define XBYAK_NOEXCEPT throw()
#endif
-#if (__cplusplus >= 201402L) || (defined(_MSC_VER) && _MSC_VER >= 1910) // Visual Studio 2017 version 15.0
- #define XBYAK_CONSTEXPR constexpr // require c++14 or later
+// require c++14 or later
+// Visual Studio 2017 version 15.0 or later
+// g++-6 or later
+#if ((__cplusplus >= 201402L) && !(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ <= 5))) || (defined(_MSC_VER) && _MSC_VER >= 1910)
+ #define XBYAK_CONSTEXPR constexpr
#else
#define XBYAK_CONSTEXPR
#endif