std::swap(std::unordered_multiset)

template< class Key, class Hash, class KeyEqual, class Alloc > void swap( unordered_multiset<Key,Hash,KeyEqual,Alloc>& lhs, unordered_multiset<Key,Hash,KeyEqual,Alloc>& rhs ); (since C++11) Specializes the std::swap algorithm for std::unordered_multiset. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - containers whose contents to swap Return value (none). Complexity Constant. Exceptions noexcept spe

std::swap(std::weak_ptr)

template< class T > void swap( weak_ptr<T>& lhs, weak_ptr<T>& rhs ); (since C++11) Specializes the std::swap algorithm for std::weak_ptr. Swaps the pointers of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - smart pointers whose contents to swap Return value (none). Exceptions noexcept specification: noexcept Complexity Constant. See also swap swaps the values of two objects (function template) swap swaps the contents (

std::swap(std::vector)

template< class T, class Alloc > void swap( vector<T,Alloc>& lhs, vector<T,Alloc>& rhs ); Specializes the std::swap algorithm for std::vector. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - containers whose contents to swap Return value (none). Complexity Constant. Exceptions noexcept specification: noexcept(noexcept(lhs.swap(rhs))) (since C++17) See also swap swaps the contents (public

std::swap(std::valarray)

template< class T > void swap( valarray<T> &lhs, valarray<T> &rhs ); Specializes the std::swap algorithm for std::valarray. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - valarrays whose contents to swap Return value (none). Complexity Constant. See also swap swaps with another valarray (public member function)

std::swap(std::tuple)

template< class... Types > void swap( tuple<Types...>& lhs, tuple<Types...>& rhs ); (since C++11) Swaps the contents of lhs and rhs. Equivalent to lhs.swap(rhs). Parameters lhs, rhs - tuples whose contents to swap Return value (none). Exceptions noexcept specification: noexcept(noexcept(lhs.swap(rhs))) See also

std::swap(std::unique_ptr)

template< class T, class Deleter > void swap( unique_ptr<T,Deleter>& lhs, unique_ptr<T,Deleter>& rhs ); (since C++11) Specializes the std::swap algorithm for std::unique_ptr. Swaps the pointers of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - smart pointers whose contents to swap Return value (none). Exceptions noexcept specification: noexcept Complexity Constant. See also swap swaps the values of two objects (function tem

std::swap(std::stack)

template< class T, class Container > void swap( stack<T,Container>& lhs, stack<T,Container>& rhs ); Specializes the std::swap algorithm for std::stack. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - containers whose contents to swap Return value (none). Complexity Same as swapping the underlying container. Exceptions noexcept specification: noexcept(noexcept(lhs.swap(rhs))) (since C++17) See

std::swap(std::unordered_map)

template< class Key, class T, class Hash, class KeyEqual, class Alloc > void swap( unordered_map<Key,T,Hash,KeyEqual,Alloc>& lhs, unordered_map<Key,T,Hash,KeyEqual,Alloc>& rhs ); (since C++11) Specializes the std::swap algorithm for std::unordered_map. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs). Parameters lhs, rhs - containers whose contents to swap Return value (none). Complexity Constant. Exceptions noexcept speci

std::swap(std::thread)

void swap( thread &lhs, thread &rhs ); (since C++11) Overloads the std::swap algorithm for std::thread. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). Parameters lhs, rhs - threads whose states to swap Return value (none). Exceptions noexcept specification: noexcept Example #include <iostream> #include <thread> #include <chrono> void foo() { std::this_thread::sleep_for(std::chrono::seconds(1)); } vo

std::swap(std::unique_lock)

template< class Mutex > void swap( unique_lock<Mutex>& lhs, unique_lock<Mutex>& rhs ); (since C++11) Specializes the std::swap algorithm for std::unique_lock. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). Parameters lhs, rhs - lock wrappers whose states to swap Return value (none). Exceptions noexcept specification: noexcept Example See also swap swaps state with another std::unique_lock (