Prevent temporaries for reductions.

This commit is contained in:
Hauke Heibel 2010-02-04 14:26:03 +01:00
parent 1a77334d54
commit d0b4ef81f0

View File

@ -313,10 +313,9 @@ template<typename Func>
inline typename ei_result_of<Func(typename ei_traits<Derived>::Scalar)>::type
DenseBase<Derived>::redux(const Func& func) const
{
typename Derived::Nested nested(derived());
typedef typename ei_cleantype<typename Derived::Nested>::type ThisNested;
return ei_redux_impl<Func, ThisNested>
::run(nested, func);
::run(derived(), func);
}
/** \returns the minimum of all coefficients of *this