27
#include "test_macros.h"
29
#include "test_allocator.h"
37
some_comp(const some_comp&) {}
38
bool operator()(const T&, const T&) const { return false; }
47
some_comp2(const some_comp2&) {}
48
bool operator()(const T&, const T&) const { return false; }
53
void swap(some_comp2<T>&, some_comp2<T>&) noexcept {}
62
some_alloc(const some_alloc&);
63
void deallocate(void*, unsigned) {}
65
typedef std::true_type propagate_on_container_swap;
74
some_alloc2(const some_alloc2&);
75
void deallocate(void*, unsigned) {}
77
typedef std::false_type propagate_on_container_swap;
78
typedef std::true_type is_always_equal;
87
some_alloc3(const some_alloc3&);
88
void deallocate(void*, unsigned) {}
90
typedef std::false_type propagate_on_container_swap;
91
typedef std::false_type is_always_equal;
97
typedef std::multiset<MoveOnly> C;
98
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
100
#if defined(_LIBCPP_VERSION)
102
typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
103
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
106
typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
107
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
111
typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
112
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
115
#if TEST_STD_VER >= 14
117
typedef std::multiset<MoveOnly, some_comp <MoveOnly>, some_alloc <MoveOnly>> C;
118
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
121
typedef std::multiset<MoveOnly, some_comp <MoveOnly>, some_alloc2<MoveOnly>> C;
122
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
125
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc <MoveOnly>> C;
126
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
129
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
130
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
132
#if defined(_LIBCPP_VERSION)
134
typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
135
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");