turn some macros intro constexpr functions

This commit is contained in:
Erik Schultheis
2021-12-10 19:27:01 +00:00
committed by Rasmus Munk Larsen
parent 0f36e42169
commit c20e908ebc
46 changed files with 200 additions and 151 deletions

View File

@@ -139,8 +139,8 @@ template<typename Derived> class SparseMatrixBase
/** type of the equivalent dense matrix */
typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> DenseMatrixType;
/** type of the equivalent square matrix */
typedef Matrix<Scalar,EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime),
EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime)> SquareMatrixType;
typedef Matrix<Scalar, internal::max_size_prefer_dynamic(RowsAtCompileTime, ColsAtCompileTime),
internal::max_size_prefer_dynamic(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType;
inline const Derived& derived() const { return *static_cast<const Derived*>(this); }
inline Derived& derived() { return *static_cast<Derived*>(this); }