diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-07-07 15:23:56 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-07-07 15:23:56 -0700 |
commit | 6de6fa94830ff6d2be0e1ceed4587cad88b11762 (patch) | |
tree | 326d8a2f246f7a3d04974800e73dcec4278c0f61 /unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h | |
parent | 7b7df7b6b816c1752b99319639da4a6799b18125 (diff) |
Use NumTraits<T>::RequireInitialization instead of internal::is_arithmetic<T>::value to check whether it's possible to bypass the type constructor in the tensor code.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h index fc98c3d1e..29bc6ca21 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h @@ -366,7 +366,7 @@ struct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Devi EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(CoeffReturnType* data) { m_impl.evalSubExprsIfNeeded(NULL); - if (internal::is_arithmetic<typename internal::remove_const<Scalar>::type>::value && data && m_impl.data()) { + if (!NumTraits<typename internal::remove_const<Scalar>::type>::RequireInitialization && data && m_impl.data()) { Index contiguous_values = 1; if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) { for (int i = 0; i < NumDims; ++i) { |