From 3ac40452727a837f55aa1f3f484d5e8c52d6d769 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 25 May 2016 15:15:12 -0700 Subject: [PATCH] Made the IndexPair code compile in non cxx11 mode --- unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h index 9ae97ba42..b1645d56f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h @@ -114,8 +114,8 @@ bool operator!=(const Tuple& x, const Tuple& y) { // Can't use std::pairs on cuda devices template struct IndexPair { - constexpr EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair() : first(0), second(0) {} - constexpr EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair(Idx f, Idx s) : first(f), second(s) {} + EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair() : first(0), second(0) {} + EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE IndexPair(Idx f, Idx s) : first(f), second(s) {} EIGEN_DEVICE_FUNC void set(IndexPair val) { first = val.first;