diff --git a/Eigen/src/Householder/HouseholderSequence.h b/Eigen/src/Householder/HouseholderSequence.h index 2acf86379..717f29c99 100644 --- a/Eigen/src/Householder/HouseholderSequence.h +++ b/Eigen/src/Householder/HouseholderSequence.h @@ -317,28 +317,11 @@ template class HouseholderS typename internal::matrix_type_times_scalar_type::Type operator*(const MatrixBase& other) const { typename internal::matrix_type_times_scalar_type::Type - res(other.template cast::ResultScalar>()); + res(other.template cast::ResultScalar>()); applyThisOnTheLeft(res); return res; } - /** \brief Computes the product of a matrix with a Householder sequence. - * \param[in] other %Matrix being multiplied. - * \param[in] h %HouseholderSequence being multiplied. - * \returns Expression object representing the product. - * - * This function computes \f$ MH \f$ where \f$ M \f$ is the matrix \p other and \f$ H \f$ is the - * Householder sequence represented by \p h. - */ - template friend - typename internal::matrix_type_times_scalar_type::Type operator*(const MatrixBase& other, const HouseholderSequence& h) - { - typename internal::matrix_type_times_scalar_type::Type - res(other.template cast::ResultScalar>()); - h.applyThisOnTheRight(res); - return res; - } - template friend struct internal::hseq_side_dependent_impl; /** \brief Sets the length of the Householder sequence. @@ -404,6 +387,23 @@ template class HouseholderS Index m_shift; }; +/** \brief Computes the product of a matrix with a Householder sequence. + * \param[in] other %Matrix being multiplied. + * \param[in] h %HouseholderSequence being multiplied. + * \returns Expression object representing the product. + * + * This function computes \f$ MH \f$ where \f$ M \f$ is the matrix \p other and \f$ H \f$ is the + * Householder sequence represented by \p h. + */ +template +typename internal::matrix_type_times_scalar_type::Type operator*(const MatrixBase& other, const HouseholderSequence& h) +{ + typename internal::matrix_type_times_scalar_type::Type + res(other.template cast::ResultScalar>()); + h.applyThisOnTheRight(res); + return res; +} + /** \ingroup Householder_Module \householder_module * \brief Convenience function for constructing a Householder sequence. * \returns A HouseholderSequence constructed from the specified arguments.