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;
96
typedef std::pair<const MoveOnly, MoveOnly> V;
98
typedef std::multimap<MoveOnly, MoveOnly> C;
99
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
101
#if defined(_LIBCPP_VERSION)
103
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
104
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
107
typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
108
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
112
typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
113
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
116
#if TEST_STD_VER >= 14
118
typedef std::multimap<MoveOnly, MoveOnly, some_comp <MoveOnly>, some_alloc <V>> C;
119
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
122
typedef std::multimap<MoveOnly, MoveOnly, some_comp <MoveOnly>, some_alloc2<V>> C;
123
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
126
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc <V>> C;
127
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
130
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
131
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
133
#if defined(_LIBCPP_VERSION)
135
typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
136
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");