Add constexpr, test for C++14 constexpr.

This commit is contained in:
Tobias Schlüter
2022-03-05 19:02:12 +09:00
committed by Rasmus Munk Larsen
parent 69f50e3a67
commit 133498c329
59 changed files with 927 additions and 631 deletions

View File

@@ -59,7 +59,7 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
using Base::coeffRef;
EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
explicit EIGEN_STRONG_INLINE ArrayWrapper(ExpressionType& matrix) : m_expression(matrix) {}
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
@@ -89,10 +89,10 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
}
template<typename Dest>
EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
inline void evalTo(Dest& dst) const { dst = m_expression; }
EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
const internal::remove_all_t<NestedExpressionType>&
nestedExpression() const
{
@@ -157,7 +157,7 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
using Base::coeffRef;
EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {}
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
@@ -186,7 +186,7 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
return m_expression.coeffRef(index);
}
EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
const internal::remove_all_t<NestedExpressionType>&
nestedExpression() const
{