aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Flagged.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/Flagged.h')
-rw-r--r--Eigen/src/Core/Flagged.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Eigen/src/Core/Flagged.h b/Eigen/src/Core/Flagged.h
index 1107e39aa..925066533 100644
--- a/Eigen/src/Core/Flagged.h
+++ b/Eigen/src/Core/Flagged.h
@@ -43,6 +43,7 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed>
struct ei_traits<Flagged<ExpressionType, Added, Removed> >
{
typedef typename ExpressionType::Scalar Scalar;
+
enum {
RowsAtCompileTime = ExpressionType::RowsAtCompileTime,
ColsAtCompileTime = ExpressionType::ColsAtCompileTime,
@@ -59,11 +60,13 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
public:
EIGEN_GENERIC_PUBLIC_INTERFACE(Flagged)
+ typedef typename ei_meta_if<ei_must_nest_by_value<ExpressionType>::ret,
+ ExpressionType, const ExpressionType&>::ret ExpressionTypeNested;
inline Flagged(const ExpressionType& matrix) : m_matrix(matrix) {}
/** \internal */
- inline ExpressionType _expression() const { return m_matrix; }
+ inline const ExpressionType& _expression() const { return m_matrix; }
private:
@@ -94,7 +97,7 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
}
protected:
- typename ExpressionType::Nested m_matrix;
+ ExpressionTypeNested m_matrix;
};
/** \returns an expression of *this with added flags