aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-02-06 02:51:59 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-02-06 02:51:59 -0800
commitdcb2a8b184c43f9b638406c39c1636e1ff2b1e23 (patch)
tree9b037538cd7d8e63409547eedede65d15c5c0948 /Eigen
parentf64045a060ae22c6445b78ecea3783cef7c1ca3b (diff)
Added the EIGEN_HAS_CONSTEXPR define
Gate the tensor index list code based on the value of EIGEN_HAS_CONSTEXPR
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/util/Macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 001907a0b..40a28d4d6 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -133,6 +133,12 @@
#define EIGEN_HAS_VARIADIC_TEMPLATES 1
#endif
+// Does the compiler support const expressions?
+#if (defined(__plusplus) && __cplusplus >= 201402L) || \
+ EIGEN_GNUC_AT_LEAST(4,9)
+#define EIGEN_HAS_CONSTEXPR 1
+#endif
+
/** Allows to disable some optimizations which might affect the accuracy of the result.
* Such optimization are enabled by default, and set EIGEN_FAST_MATH to 0 to disable them.
* They currently include: