From 3d6c030b1f7afb13cc0e3d71663dab764847f8b2 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Fri, 23 Aug 2013 21:28:30 +0200 Subject: [PATCH] arrays : correct deletion of std::swap for views - forgot the bool flags, in case a weak view is involved. --- triqs/arrays/array.hpp | 4 ++-- triqs/arrays/matrix.hpp | 4 ++-- triqs/arrays/vector.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/triqs/arrays/array.hpp b/triqs/arrays/array.hpp index 4726b258..90148e11 100644 --- a/triqs/arrays/array.hpp +++ b/triqs/arrays/array.hpp @@ -212,8 +212,8 @@ namespace triqs { namespace arrays { // The std::swap is WRONG for a view because of the copy/move semantics of view. // Use swap instead (the correct one, found by ADL). namespace std { - template - void swap( triqs::arrays::array_view & a , triqs::arrays::array_view & b)= delete; + template + void swap( triqs::arrays::array_view & a , triqs::arrays::array_view & b)= delete; } #include "./expression_template/array_algebra.hpp" diff --git a/triqs/arrays/matrix.hpp b/triqs/arrays/matrix.hpp index 00a0097f..8eef4d4f 100644 --- a/triqs/arrays/matrix.hpp +++ b/triqs/arrays/matrix.hpp @@ -198,8 +198,8 @@ namespace triqs { namespace arrays { // The std::swap is WRONG for a view because of the copy/move semantics of view. // Use swap instead (the correct one, found by ADL). namespace std { - template - void swap( triqs::arrays::matrix_view & a , triqs::arrays::matrix_view & b)= delete; + template + void swap( triqs::arrays::matrix_view & a , triqs::arrays::matrix_view & b)= delete; } #include "./expression_template/matrix_algebra.hpp" #endif diff --git a/triqs/arrays/vector.hpp b/triqs/arrays/vector.hpp index 40e44898..94801669 100644 --- a/triqs/arrays/vector.hpp +++ b/triqs/arrays/vector.hpp @@ -293,7 +293,7 @@ namespace triqs { namespace arrays { // The std::swap is WRONG for a view because of the copy/move semantics of view. // Use swap instead (the correct one, found by ADL). namespace std { - template void swap( triqs::arrays::vector_view & a , triqs::arrays::vector_view & b)= delete; + template void swap( triqs::arrays::vector_view & a , triqs::arrays::vector_view & b)= delete; } #include "./expression_template/vector_algebra.hpp"