mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Evaluators: Remove member variables if known at compile-time.
Also, use composition instead of inheritance in EvalToTemp evaluator.
This commit is contained in:
@@ -77,11 +77,12 @@ struct traits<Diagonal<MatrixType,DiagIndex> >
|
||||
};
|
||||
}
|
||||
|
||||
template<typename MatrixType, int DiagIndex> class Diagonal
|
||||
: public internal::dense_xpr_base< Diagonal<MatrixType,DiagIndex> >::type
|
||||
template<typename MatrixType, int _DiagIndex> class Diagonal
|
||||
: public internal::dense_xpr_base< Diagonal<MatrixType,_DiagIndex> >::type
|
||||
{
|
||||
public:
|
||||
|
||||
enum { DiagIndex = _DiagIndex };
|
||||
typedef typename internal::dense_xpr_base<Diagonal>::type Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user