Added EIGEN_REF_TO_TEMPORARY define for rvalue support.

Allowed VC10 to make use of static_assert.
This commit is contained in:
Hauke Heibel
2009-09-21 19:59:58 +02:00
parent c1c780a94f
commit c6822d6723
9 changed files with 22 additions and 14 deletions

View File

@@ -300,13 +300,13 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
}
template<typename OtherDerived>
void swap(const TriangularBase<OtherDerived>& other)
void swap(TriangularBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
{
TriangularView<SwapWrapper<MatrixType>,Mode>(const_cast<MatrixType&>(m_matrix)).lazyAssign(other.derived());
}
template<typename OtherDerived>
void swap(const MatrixBase<OtherDerived>& other)
void swap(MatrixBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other)
{
TriangularView<SwapWrapper<MatrixType>,Mode>(const_cast<MatrixType&>(m_matrix)).lazyAssign(other.derived());
}