diff --git a/alib2std/src/extensions/forward_tree.hpp b/alib2std/src/extensions/forward_tree.hpp index 3784b7376c411b555c25a99697b7f1c436f745f1..e357706d68855ad7b6c379cdc346c6071f482590 100644 --- a/alib2std/src/extensions/forward_tree.hpp +++ b/alib2std/src/extensions/forward_tree.hpp @@ -518,6 +518,8 @@ public: // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- friend void swap ( forward_tree & first, forward_tree & second ) { + using std::swap; + swap ( std::move ( first.m_data ), std::move ( second.m_data ) ); swap ( std::move ( first.m_children ), std::move ( second.m_children ) ); } diff --git a/alib2std/src/extensions/tree.hpp b/alib2std/src/extensions/tree.hpp index 87861774b80ea02927823796f2e09c92d26689fd..81e568df4173f00bbaa063d56cc37ba7f5fea82a 100644 --- a/alib2std/src/extensions/tree.hpp +++ b/alib2std/src/extensions/tree.hpp @@ -553,6 +553,8 @@ public: // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- friend void swap ( tree & first, tree & second ) { + using std::swap; + swap ( std::move ( first.m_data ), std::move ( second.m_data ) ); swap ( std::move ( first.m_children ), std::move ( second.m_children ) ); swap ( std::move ( first.m_parent ), std::move ( second.m_parent ) ); diff --git a/alib2std/src/extensions/tree_base.hpp b/alib2std/src/extensions/tree_base.hpp index a24299a1d4cf5201f48ea2fa970c451d63b65631..69670c2c76565037974b98acf41718e90ef38321 100644 --- a/alib2std/src/extensions/tree_base.hpp +++ b/alib2std/src/extensions/tree_base.hpp @@ -113,7 +113,9 @@ public: } AnyaryNode & operator =( AnyaryNode && other ) noexcept { - std::swap ( this->children_union.children, other.children_union.children ); + using std::swap; + + swap ( this->children_union.children, other.children_union.children ); setParent ( std::make_index_sequence < arity > ( ) ); @@ -302,7 +304,9 @@ public: } FixedaryNode & operator =( FixedaryNode && other ) noexcept { - std::swap ( this->children_union.children, other.children_union.children ); + using std::swap; + + swap ( this->children_union.children, other.children_union.children ); for ( Data & child : children_union.children ) child->parent = static_cast < Cast * > ( this ); @@ -378,7 +382,9 @@ public: } VararyNode & operator =( VararyNode && other ) noexcept { - std::swap ( this->children_union.children, other.children_union.children ); + using std::swap; + + swap ( this->children_union.children, other.children_union.children ); for ( Data & child : children_union.children ) child->parent = static_cast < Cast * > ( this ); diff --git a/alib2std/src/extensions/utility.hpp b/alib2std/src/extensions/utility.hpp index f24cfbbcd99e47380bb7a4aeeacc15d3f6feaddd..fa8b84961d116054b68d7feae36f981695401752 100644 --- a/alib2std/src/extensions/utility.hpp +++ b/alib2std/src/extensions/utility.hpp @@ -65,7 +65,9 @@ struct rvalue_ref { rvalue_ref & operator = ( const rvalue_ref & ) = delete; rvalue_ref & operator = ( rvalue_ref && other ) { - std::swap(holder, other.holder); + using std::swap; + + swap(holder, other.holder); } ~rvalue_ref ( ) { diff --git a/alib2std/src/extensions/variant.hpp b/alib2std/src/extensions/variant.hpp index 013eac0d546a852f5ef5a9ae43f124e3610c4aad..a0e5540643abb3035dfe8e69b72fe5263cf54bed 100644 --- a/alib2std/src/extensions/variant.hpp +++ b/alib2std/src/extensions/variant.hpp @@ -240,8 +240,10 @@ public: // move assignment operator variant<Ts...>& operator= (variant<Ts...> && old) noexcept { - std::swap(this->type_id, old.type_id); - std::swap(this->data, old.data); + using std::swap; + + swap(this->type_id, old.type_id); + swap(this->data, old.data); return *this; }