Resurect EvalBeforeNestingBit to control nested_eval

This commit is contained in:
Gael Guennebaud 2014-03-12 20:25:36 +01:00
parent 16d4c7a5e8
commit aceae8314b
3 changed files with 5 additions and 3 deletions

View File

@ -110,6 +110,8 @@ struct evaluator<Inverse<XprType> >
typedef evaluator type;
typedef evaluator nestedType;
enum { Flags = Base::Flags | EvalBeforeNestingBit };
evaluator(const InverseType& inv_xpr)
: m_result(inv_xpr.rows(), inv_xpr.cols())

View File

@ -53,9 +53,8 @@ const int Infinity = -1;
const unsigned int RowMajorBit = 0x1;
/** \ingroup flags
* \deprecated
* means the expression should be evaluated by the calling expression */
const unsigned int EvalBeforeNestingBit = 0x2; // FIXME deprecated
const unsigned int EvalBeforeNestingBit = 0x2;
/** \ingroup flags
* \deprecated

View File

@ -432,7 +432,8 @@ template<typename T, int n, typename PlainObject = typename eval<T>::type> struc
};
typedef typename conditional<
int(CostEvalAsInteger) < int(CostNoEvalAsInteger),
( (int(evaluator<T>::Flags) & EvalBeforeNestingBit) ||
(int(CostEvalAsInteger) < int(CostNoEvalAsInteger)) ),
PlainObject,
typename ref_selector<T>::type
>::type type;