mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Get rid of must_nest_by_value
This commit is contained in:
parent
846b227bb7
commit
6b33b29f00
@ -44,8 +44,7 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
|
|||||||
typedef MatrixBase<Flagged> Base;
|
typedef MatrixBase<Flagged> Base;
|
||||||
|
|
||||||
EIGEN_DENSE_PUBLIC_INTERFACE(Flagged)
|
EIGEN_DENSE_PUBLIC_INTERFACE(Flagged)
|
||||||
typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret,
|
typedef typename internal::ref_selector<ExpressionType>::type ExpressionTypeNested;
|
||||||
ExpressionType, const ExpressionType&>::type ExpressionTypeNested;
|
|
||||||
typedef typename ExpressionType::InnerIterator InnerIterator;
|
typedef typename ExpressionType::InnerIterator InnerIterator;
|
||||||
|
|
||||||
explicit inline Flagged(const ExpressionType& matrix) : m_matrix(matrix) {}
|
explicit inline Flagged(const ExpressionType& matrix) : m_matrix(matrix) {}
|
||||||
|
@ -160,8 +160,7 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
|||||||
typedef typename ExpressionType::Scalar Scalar;
|
typedef typename ExpressionType::Scalar Scalar;
|
||||||
typedef typename ExpressionType::RealScalar RealScalar;
|
typedef typename ExpressionType::RealScalar RealScalar;
|
||||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||||
typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret,
|
typedef typename internal::ref_selector<ExpressionType>::non_const_type ExpressionTypeNested;
|
||||||
ExpressionType, ExpressionType&>::type ExpressionTypeNested;
|
|
||||||
typedef typename internal::remove_all<ExpressionTypeNested>::type ExpressionTypeNestedCleaned;
|
typedef typename internal::remove_all<ExpressionTypeNested>::type ExpressionTypeNestedCleaned;
|
||||||
|
|
||||||
template<template<typename _Scalar> class Functor,
|
template<template<typename _Scalar> class Functor,
|
||||||
|
@ -312,9 +312,6 @@ template<typename T> struct plain_matrix_type_row_major
|
|||||||
> type;
|
> 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
|
/** \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
|
* need to use references for expressions since they are light weight proxy
|
||||||
* objects which should generate no copying overhead. */
|
* objects which should generate no copying overhead. */
|
||||||
@ -326,6 +323,12 @@ struct ref_selector
|
|||||||
T const&,
|
T const&,
|
||||||
const T
|
const T
|
||||||
>::type type;
|
>::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 */
|
/** \internal Adds the const qualifier on the value-type of T2 if and only if T1 is a const type */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user