aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-10-20 11:53:30 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-10-20 11:53:30 -0700
commit0af63493fdb12cea2fdfbabfbddbd4db44587047 (patch)
tree9dadfbc36285371433d02f62fdb9f7d6381ef249 /unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h
parent73b8e719ae28fe0a4b22cc9720fa46ce601541f9 (diff)
Disable SFINAE for versions of gcc older than 4.8
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h
index 6d9cc4f38..939de5f11 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h
@@ -26,8 +26,17 @@
* void foo(){}
*/
+// SFINAE requires variadic templates
#ifdef EIGEN_HAS_VARIADIC_TEMPLATES
-#define EIGEN_HAS_SFINAE
+ // SFINAE doesn't work for gcc <= 4.7
+ #ifdef EIGEN_COMP_GNUC
+ #if EIGEN_GNUC_AT_LEAST(4,8)
+ #define EIGEN_HAS_SFINAE
+ #endif
+ #else
+ #define EIGEN_HAS_SFINAE
+ #endif
+
#endif
#define EIGEN_SFINAE_ENABLE_IF( __condition__ ) \