tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
swap.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  etl
 

Functions

template<typename T>
requires (etl::is_move_constructible_v<T> and etl::is_move_assignable_v<T>)
constexpr auto swap (T &a, T &b) noexcept(etl::is_nothrow_move_constructible_v< T > and etl::is_nothrow_move_assignable_v< T >) -> void
 Exchanges the given values. Swaps the values a and b. This overload does not participate in overload resolution unless etl::is_move_constructible_v<T> && etl::is_move_assignable_v<T> is true.
 
template<typename T, etl::size_t N>
requires (etl::is_swappable_v<T>)
constexpr auto swap (T(&a)[N], T(&b)[N]) noexcept(etl::is_nothrow_swappable< T >::value) -> void