aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-30 17:08:13 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-03-30 17:08:13 -0700
commit483aaad10a925b5b22ea87bcabe01712db4fe870 (patch)
tree651d7ed04122519e333c73da1fdd701884f94152 /unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h
parent1b40abbf99d2022d1167063f7e52126cbe8d76bd (diff)
Fixed compilation warning
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h
index 543a444fb..f68ac1794 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h
@@ -53,7 +53,9 @@ struct TensorUInt128
template<typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
explicit TensorUInt128(const T& x) : high(0), low(x) {
- eigen_assert(x < NumTraits<LOW>::highest());
+ typedef typename conditional<sizeof(T) == 8, uint64_t, uint32_t>::type UnsignedT;
+ typedef typename conditional<sizeof(LOW) == 8, uint64_t, uint32_t>::type UnsignedLow;
+ eigen_assert(static_cast<UnsignedT>(x) < static_cast<UnsignedLow>(NumTraits<LOW>::highest()));
eigen_assert(x >= 0);
}