aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/XprHelper.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2017-09-14 19:23:38 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2017-09-14 19:23:38 +0200
commit0c9ad2f52526bd7f07ba41161e68bee7231c05c7 (patch)
treeb02b4b51521fd8733ca98a81d1e1e7e85ba217a2 /Eigen/src/Core/util/XprHelper.h
parent1b7294f6fc5661ef196acf95f0eafa3242939be1 (diff)
std::integral_constant is not C++03 compatible
Diffstat (limited to 'Eigen/src/Core/util/XprHelper.h')
-rw-r--r--Eigen/src/Core/util/XprHelper.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h
index c88f1dbb9..10328be0d 100644
--- a/Eigen/src/Core/util/XprHelper.h
+++ b/Eigen/src/Core/util/XprHelper.h
@@ -36,14 +36,16 @@ inline IndexDest convert_index(const IndexSrc& idx) {
// true if T can be considered as an integral index (i.e., and integral type or enum)
template<typename T> struct is_valid_index_type
- : std::integral_constant<bool,
+{
+ enum { value =
#if EIGEN_HAS_TYPE_TRAITS
internal::is_integral<T>::value || std::is_enum<T>::value
#else
// without C++11, we use is_convertible to Index instead of is_integral in order to treat enums as Index.
internal::is_convertible<T,Index>::value
#endif
-> {};
+ };
+};
// promote_scalar_arg is an helper used in operation between an expression and a scalar, like:
// expression * scalar