diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-11-06 09:25:26 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-11-06 09:25:26 +0100 |
commit | 722916e19d86b224ec6c705e24d376def524154b (patch) | |
tree | f68ce5ba93b0ab12fbd838e6254b99086730901c /failtest/swap_2.cpp | |
parent | c6fefe5d8e3eda8af05c7dcb278551598dbb5d8e (diff) |
bug #903: clean swap API regarding extra enable_if parameters, and add failtests for swap
Diffstat (limited to 'failtest/swap_2.cpp')
-rw-r--r-- | failtest/swap_2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/failtest/swap_2.cpp b/failtest/swap_2.cpp new file mode 100644 index 000000000..c130ba6e4 --- /dev/null +++ b/failtest/swap_2.cpp @@ -0,0 +1,14 @@ +#include "../Eigen/Core" + +using namespace Eigen; + +int main() +{ + VectorXf a(10), b(10); + VectorXf const &ac(a); +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD + b.swap(ac); +#else + b.swap(ac.const_cast_derived()); +#endif +}
\ No newline at end of file |