From 6de6fa94830ff6d2be0e1ceed4587cad88b11762 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 7 Jul 2015 15:23:56 -0700 Subject: Use NumTraits::RequireInitialization instead of internal::is_arithmetic::value to check whether it's possible to bypass the type constructor in the tensor code. --- unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h b/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h index d253b70f3..d0202559a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h @@ -109,7 +109,7 @@ struct TensorEvaluator, Device> const Index numValues = m_impl.dimensions().TotalSize(); m_buffer = (CoeffReturnType*)m_device.allocate(numValues * sizeof(CoeffReturnType)); // Should initialize the memory in case we're dealing with non POD types. - if (!internal::is_arithmetic::value) { + if (NumTraits::RequireInitialization) { for (Index i = 0; i < numValues; ++i) { new(m_buffer+i) CoeffReturnType(); } -- cgit v1.2.3