5 #ifndef VCCC_CONCEPTS_SWAP_HPP
6 #define VCCC_CONCEPTS_SWAP_HPP
22 namespace detail_ranges_swap {
27 constexpr
void swap(T&, T&) =
delete;
29 template<
typename T,
typename U>
30 constexpr
auto test_swap(
int) -> decltype(
swap(std::declval<T>(), std::declval<U>()), std::true_type{});
32 template<
typename T,
typename U>
35 template<
typename T,
typename U,
bool =
disjunction<
40 template<
typename T,
typename U>
43 template<
typename T,
typename U,
typename =
void>
47 template<
typename T,
typename U, std::enable_if_t<
50 constexpr
void operator()(T&& t, U&& u)
const noexcept(noexcept(
swap(std::forward<T>(t), std::forward<U>(u)))) {
51 swap(std::forward<T>(t), std::forward<U>(u));
54 template<
typename T,
typename U, std::size_t N, std::enable_if_t<
conjunction<
58 constexpr
void operator()(T(&t)[N], U(&u)[N])
const noexcept(noexcept((*
this)(*t, *u))) {
60 for (std::size_t i = 0; i < N; ++i) {
67 move_constructible<V>,
104 using namespace niebloid;
106 namespace detail_ranges_swap {
108 template<
typename T,
typename U, std::
size_t N>
constexpr VCCC_INLINE_OR_STATIC detail_ranges_swap::swap_niebloid swap
swaps the values of two objects
Definition: swap.hpp:99
void swap(::vccc::optional< T > &lhs, ::vccc::optional< T > &rhs) noexcept(noexcept(lhs.swap(rhs)))
Definition: swap.h:30
#define VCCC_INLINE_OR_STATIC
Definition: inline_or_static.hpp:9
constexpr void swap(T &, T &)=delete
constexpr auto test_swap(int) -> decltype(swap(std::declval< T >(), std::declval< U >()), std::true_type{})
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Models std::assignable_from
Definition: assignable_from.hpp:66
Definition: conjunction.hpp:22
Definition: disjunction.hpp:22
Definition: is_class_or_enum.hpp:20
Definition: negation.hpp:23
constexpr void operator()(V &t, V &u) const noexcept(std::is_nothrow_move_constructible< V >::value &&std::is_nothrow_move_assignable< V >::value)
Definition: swap.hpp:70
constexpr void operator()(T &&t, U &&u) const noexcept(noexcept(swap(std::forward< T >(t), std::forward< U >(u))))
Definition: swap.hpp:50
constexpr void operator()(T(&t)[N], U(&u)[N]) const noexcept(noexcept((*this)(*t, *u)))
Definition: swap.hpp:58