diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 49e27a448..2f0ea9c01 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -374,8 +374,8 @@ template<> struct gemv_selector typedef typename ProductType::RhsBlasTraits RhsBlasTraits; typedef Map, Aligned> MappedDest; - ActualLhsType actualLhs = LhsBlasTraits::extract(prod.lhs()); - ActualRhsType actualRhs = RhsBlasTraits::extract(prod.rhs()); + const ActualLhsType actualLhs = LhsBlasTraits::extract(prod.lhs()); + const ActualRhsType actualRhs = RhsBlasTraits::extract(prod.rhs()); ResScalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs()) * RhsBlasTraits::extractScalarFactor(prod.rhs()); @@ -411,7 +411,7 @@ template<> struct gemv_selector general_matrix_vector_product ::run( actualLhs.rows(), actualLhs.cols(), - &actualLhs.const_cast_derived().coeffRef(0,0), actualLhs.outerStride(), + &actualLhs.coeffRef(0,0), actualLhs.outerStride(), actualRhs.data(), actualRhs.innerStride(), actualDest, 1, compatibleAlpha);