diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 5838af70d..e165a841b 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -266,7 +266,10 @@ MatrixBase::dot(const MatrixBase& other) const ei_assert(size() == other.size()); - return ei_dot_impl::run(derived(), other.derived()); + // dot() must honor EvalBeforeNestingBit (eg: v.dot(M*v) ) + typedef typename ei_cleantype::type ThisNested; + typedef typename ei_cleantype::type OtherNested; + return ei_dot_impl::run(derived(), other.derived()); } /** \returns the squared \em l2 norm of *this, i.e., for vectors, the dot product of *this with itself.