Move internal::swap to numext to fix ambiguous call with std::swap

This commit is contained in:
Gael Guennebaud
2013-11-07 09:01:26 +01:00
parent 8edc964734
commit 8fe609311d
2 changed files with 14 additions and 6 deletions

View File

@@ -606,12 +606,12 @@ template<typename SolverType> struct direct_selfadjoint_eigenvalues<SolverType,3
// Sort in increasing order.
if (roots(0) >= roots(1))
internal::swap(roots(0),roots(1));
numext::swap(roots(0),roots(1));
if (roots(1) >= roots(2))
{
internal::swap(roots(1),roots(2));
numext::swap(roots(1),roots(2));
if (roots(0) >= roots(1))
internal::swap(roots(0),roots(1));
numext::swap(roots(0),roots(1));
}
}