Really fix #123.

This commit is contained in:
Hauke Heibel 2010-06-14 23:02:49 +02:00
parent 3cabd0c417
commit 0afb1e80c7
2 changed files with 27 additions and 3 deletions

View File

@ -538,9 +538,25 @@ EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const MatrixBase& ot
template<typename Derived>
template <typename OtherDerived>
EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const MatrixBase<OtherDerived>& other)
EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const DenseBase<OtherDerived>& other)
{
return ei_assign_selector<Derived,OtherDerived>::run(derived(), other.derived());
}
template<typename Derived>
template <typename OtherDerived>
EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const EigenBase<OtherDerived>& other)
{
other.derived().evalTo(derived());
return derived();
}
template<typename Derived>
template<typename OtherDerived>
EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const ReturnByValue<OtherDerived>& other)
{
other.evalTo(derived());
return derived();
}
#endif // EIGEN_ASSIGN_H

View File

@ -83,7 +83,6 @@ template<typename Derived> class MatrixBase
using Base::coeffRef;
using Base::lazyAssign;
using Base::eval;
using Base::operator=;
using Base::operator+=;
using Base::operator-=;
using Base::operator*=;
@ -153,8 +152,17 @@ template<typename Derived> class MatrixBase
*/
Derived& operator=(const MatrixBase& other);
// We cannot inherit here via Base::operator= since it is causing
// trouble with MSVC.
template <typename OtherDerived>
Derived& operator=(const MatrixBase<OtherDerived>& other);
Derived& operator=(const DenseBase<OtherDerived>& other);
template <typename OtherDerived>
Derived& operator=(const EigenBase<OtherDerived>& other);
template<typename OtherDerived>
Derived& operator=(const ReturnByValue<OtherDerived>& other);
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename ProductDerived, typename Lhs, typename Rhs>