From a0eba017691db85fe6a155149bf1eb20fda3f80c Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Tue, 10 Sep 2013 10:46:19 +0200 Subject: [PATCH] arrays : clean move constructor of cuboid::map - remove mess linked to old icc 13 support and write a clear and readable code. --- triqs/arrays/indexmaps/cuboid/map.hpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/triqs/arrays/indexmaps/cuboid/map.hpp b/triqs/arrays/indexmaps/cuboid/map.hpp index c4e055e0..62f63cca 100644 --- a/triqs/arrays/indexmaps/cuboid/map.hpp +++ b/triqs/arrays/indexmaps/cuboid/map.hpp @@ -79,20 +79,11 @@ namespace triqs { namespace arrays { namespace indexmaps { namespace cuboid { template map (map const & C): mydomain(C.domain()), strides_(C.strides()), start_shift_(C.start_shift()), memory_order_ (C.memory_indices_layout()) {} - // value semantics + // regular type map (map const & C) = default; - map (map && C) { *this = std::move(C);} - friend void swap(map & a, map & b) { - swap(a.mydomain, b.mydomain); std::swap(a.start_shift_,b.start_shift_); -#ifdef TRIQS_WORKAROUND_INTEL_COMPILER_BUGS - std::swap(a.memory_order_.value, b.memory_order_.value);// why is there a link pb on icc ? temporary fix... -#else - std::swap(a.memory_order_, b.memory_order_); -#endif - swap(a.strides_, b.strides_); - } + map (map && C) = default; map & operator = (map const & m) = default; - map & operator = (map && m) { swap(*this,m); return *this;} + map & operator = (map && m) = default; /// Returns the shift in position of the element key. template