Get rid of must_nest_by_value

This commit is contained in:
Gael Guennebaud 2015-06-19 18:12:40 +02:00
parent 846b227bb7
commit 6b33b29f00
3 changed files with 8 additions and 7 deletions

View File

@ -44,8 +44,7 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
typedef MatrixBase<Flagged> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Flagged)
typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret,
ExpressionType, const ExpressionType&>::type ExpressionTypeNested;
typedef typename internal::ref_selector<ExpressionType>::type ExpressionTypeNested;
typedef typename ExpressionType::InnerIterator InnerIterator;
explicit inline Flagged(const ExpressionType& matrix) : m_matrix(matrix) {}

View File

@ -160,8 +160,7 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
typedef typename ExpressionType::Scalar Scalar;
typedef typename ExpressionType::RealScalar RealScalar;
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret,
ExpressionType, ExpressionType&>::type ExpressionTypeNested;
typedef typename internal::ref_selector<ExpressionType>::non_const_type ExpressionTypeNested;
typedef typename internal::remove_all<ExpressionTypeNested>::type ExpressionTypeNestedCleaned;
template<template<typename _Scalar> class Functor,

View File

@ -312,9 +312,6 @@ template<typename T> struct plain_matrix_type_row_major
> type;
};
// TODO we should be able to get rid of this one too
template<typename T> struct must_nest_by_value { enum { ret = false }; };
/** \internal The reference selector for template expressions. The idea is that we don't
* need to use references for expressions since they are light weight proxy
* objects which should generate no copying overhead. */
@ -326,6 +323,12 @@ struct ref_selector
T const&,
const T
>::type type;
typedef typename conditional<
bool(traits<T>::Flags & NestByRefBit),
T &,
T
>::type non_const_type;
};
/** \internal Adds the const qualifier on the value-type of T2 if and only if T1 is a const type */