bug #903: clean swap API regarding extra enable_if parameters, and add failtests for swap

This commit is contained in:
Gael Guennebaud
2014-11-06 09:25:26 +01:00
parent c6fefe5d8e
commit 722916e19d
9 changed files with 61 additions and 31 deletions

14
failtest/swap_1.cpp Normal file
View File

@@ -0,0 +1,14 @@
#include "../Eigen/Core"
using namespace Eigen;
int main()
{
VectorXf a(10), b(10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
const DenseBase<VectorXf> &ac(a);
#else
DenseBase<VectorXf> &ac(a);
#endif
b.swap(ac);
}