diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h b/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h index 12628df1c..cdf2272ed 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h @@ -12,16 +12,14 @@ namespace Eigen { -namespace MatrixPowerHelper { - template -class ReturnValue : public ReturnByValue< ReturnValue > +class MatrixPowerRetval : public ReturnByValue< MatrixPowerRetval > { public: typedef typename MatrixPowerType::PlainObject::RealScalar RealScalar; typedef typename MatrixPowerType::PlainObject::Index Index; - ReturnValue(MatrixPowerType& pow, RealScalar p) : m_pow(pow), m_p(p) + MatrixPowerRetval(MatrixPowerType& pow, RealScalar p) : m_pow(pow), m_p(p) { } template @@ -34,11 +32,9 @@ class ReturnValue : public ReturnByValue< ReturnValue > private: MatrixPowerType& m_pow; const RealScalar m_p; - ReturnValue& operator=(const ReturnValue&); + MatrixPowerRetval& operator=(const MatrixPowerRetval&); }; -} // namespace MatrixPowerHelper - template class MatrixPowerAtomic { @@ -301,8 +297,8 @@ class MatrixPowerTriangular * \return The expression \f$ A^p \f$, where A is specified in the * constructor. */ - const MatrixPowerHelper::ReturnValue operator()(RealScalar p) - { return MatrixPowerHelper::ReturnValue(*this, p); } + const MatrixPowerRetval operator()(RealScalar p) + { return MatrixPowerRetval(*this, p); } /** * \brief Compute the matrix power. @@ -450,8 +446,8 @@ class MatrixPower * \return The expression \f$ A^p \f$, where A is specified in the * constructor. */ - const MatrixPowerHelper::ReturnValue operator()(RealScalar p) - { return MatrixPowerHelper::ReturnValue(*this, p); } + const MatrixPowerRetval operator()(RealScalar p) + { return MatrixPowerRetval(*this, p); } /** * \brief Compute the matrix power. @@ -635,7 +631,7 @@ class MatrixPowerReturnValue : public ReturnByValue< MatrixPowerReturnValue -struct traits< MatrixPowerHelper::ReturnValue > +struct traits< MatrixPowerRetval > { typedef typename MatrixPowerType::PlainObject ReturnType; }; template