diff --git a/Eigen/src/Core/Inverse.h b/Eigen/src/Core/Inverse.h index 0cfc71d34..57eaf99f1 100644 --- a/Eigen/src/Core/Inverse.h +++ b/Eigen/src/Core/Inverse.h @@ -110,6 +110,8 @@ struct evaluator > typedef evaluator type; typedef evaluator nestedType; + + enum { Flags = Base::Flags | EvalBeforeNestingBit }; evaluator(const InverseType& inv_xpr) : m_result(inv_xpr.rows(), inv_xpr.cols()) diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index d9e51ffea..64efac8e9 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -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 diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 016b37f71..0be5029c9 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -432,7 +432,8 @@ template::type> struc }; typedef typename conditional< - int(CostEvalAsInteger) < int(CostNoEvalAsInteger), + ( (int(evaluator::Flags) & EvalBeforeNestingBit) || + (int(CostEvalAsInteger) < int(CostNoEvalAsInteger)) ), PlainObject, typename ref_selector::type >::type type;