mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 11:13:46 +01:00
arrays : correct deletion of std::swap for views
- forgot the bool flags, in case a weak view is involved.
This commit is contained in:
parent
f78e6baf9e
commit
3d6c030b1f
@ -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 <typename V, int R, triqs::ull_t Opt, triqs::ull_t To >
|
||||
void swap( triqs::arrays::array_view<V,R,Opt,To> & a , triqs::arrays::array_view<V,R,Opt,To> & b)= delete;
|
||||
template <typename V, int R, triqs::ull_t Opt, triqs::ull_t To, bool B1, bool B2>
|
||||
void swap( triqs::arrays::array_view<V,R,Opt,To,B1> & a , triqs::arrays::array_view<V,R,Opt,To,B2> & b)= delete;
|
||||
}
|
||||
|
||||
#include "./expression_template/array_algebra.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 <typename V, triqs::ull_t Opt, triqs::ull_t To >
|
||||
void swap( triqs::arrays::matrix_view<V,Opt,To> & a , triqs::arrays::matrix_view<V,Opt,To> & b)= delete;
|
||||
template <typename V, triqs::ull_t Opt, triqs::ull_t To, bool B1, bool B2>
|
||||
void swap( triqs::arrays::matrix_view<V,Opt,To,B1> & a , triqs::arrays::matrix_view<V,Opt,To,B2> & b)= delete;
|
||||
}
|
||||
#include "./expression_template/matrix_algebra.hpp"
|
||||
#endif
|
||||
|
@ -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 <typename V, triqs::ull_t S> void swap( triqs::arrays::vector_view<V,S> & a , triqs::arrays::vector_view<V,S> & b)= delete;
|
||||
template <typename V, triqs::ull_t S, bool B1, bool B2> void swap( triqs::arrays::vector_view<V,S,B1> & a , triqs::arrays::vector_view<V,S,B2> & b)= delete;
|
||||
}
|
||||
|
||||
#include "./expression_template/vector_algebra.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user