From 71070a1e84538a91e6ecf364f4a23716eeb780bc Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Fri, 14 Sep 2018 17:17:50 -0700 Subject: [PATCH] Const cast scalar pointer in TensorSlicingOp evaluator --- unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h index 16dc74afe..d19aba3b3 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h @@ -695,7 +695,7 @@ struct TensorEvaluator, Devi } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename Eigen::internal::traits::PointerType data() const { - Scalar* result = m_impl.data(); + Scalar* result = const_cast(m_impl.data()); if (result) { Index offset = 0; if (static_cast(Layout) == static_cast(ColMajor)) {