add missing constexpr qualifier

This commit is contained in:
Nuno Gonçalves 2024-01-19 18:49:53 +00:00 committed by Rasmus Munk Larsen
parent 34fd46a9b4
commit b0f906419e

View File

@ -204,7 +204,9 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
* provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.
*
* See DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index) const for details. */
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& coeff(Index index) const { return m_storage.data()[index]; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const Scalar& coeff(Index index) const {
return m_storage.data()[index];
}
/** This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,Index) const
* provided to by-pass the creation of an evaluator of the expression, thus saving compilation efforts.