From 4daa1292d7d7b9901860383664cc6099271cb947 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Tue, 26 Jan 2016 16:53:03 +0100 Subject: [PATCH] bug #1153: Don't rely on __GXX_EXPERIMENTAL_CXX0X__ to detect C++11 support --- Eigen/src/Core/util/Macros.h | 2 +- Eigen/src/Core/util/StaticAssert.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 2f490252b..aac25c5e3 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -367,7 +367,7 @@ // Do we support r-value references? #if (__has_feature(cxx_rvalue_references) || \ - defined(__GXX_EXPERIMENTAL_CXX0X__) || \ + (defined(__cplusplus) && __cplusplus >= 201103L) || \ (defined(_MSC_VER) && _MSC_VER >= 1600)) #define EIGEN_HAVE_RVALUE_REFERENCES #endif diff --git a/Eigen/src/Core/util/StaticAssert.h b/Eigen/src/Core/util/StaticAssert.h index bac5d9fe9..e53d2b878 100644 --- a/Eigen/src/Core/util/StaticAssert.h +++ b/Eigen/src/Core/util/StaticAssert.h @@ -26,7 +26,7 @@ #ifndef EIGEN_NO_STATIC_ASSERT - #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) + #if __has_feature(cxx_static_assert) || (defined(__cplusplus) && __cplusplus >= 201103L) || (EIGEN_COMP_MSVC >= 1600) // if native static_assert is enabled, let's use it #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);