diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-10-20 11:53:30 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-10-20 11:53:30 -0700 |
commit | 0af63493fdb12cea2fdfbabfbddbd4db44587047 (patch) | |
tree | 9dadfbc36285371433d02f62fdb9f7d6381ef249 /unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h | |
parent | 73b8e719ae28fe0a4b22cc9720fa46ce601541f9 (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.h | 11 |
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__ ) \ |