From 194daa30485a4f3a39a4f81a8c8d11372f32a00f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 11 Jul 2016 11:39:27 +0200 Subject: Fix assertion (it did not make sense for static_val types) --- unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h index bdcd70fd9..3523e7c94 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h @@ -20,6 +20,7 @@ struct static_val { EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE operator uint64_t() const { return n; } EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static_val() { } + template EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static_val(const T& v) { eigen_assert(v == n); @@ -53,7 +54,7 @@ struct TensorUInt128 template EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE explicit TensorUInt128(const T& x) : high(0), low(x) { - eigen_assert((static_cast::type>(x) <= static_cast::type>(NumTraits::highest()))); + eigen_assert((static_cast::type>(x) <= NumTraits::highest())); eigen_assert(x >= 0); } -- cgit v1.2.3