1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // unordered_multiset()
14 // is_nothrow_default_constructible<allocator_type>::value &&
15 // is_nothrow_default_constructible<key_compare>::value &&
16 // is_nothrow_copy_constructible<key_compare>::value);
18 // This tests a conforming extension
20 #include <unordered_set>
24 #include "test_allocator.h"
25 #include "../../../test_hash.h"
32 some_comp(const some_comp&);
40 some_hash(const some_hash&);
45 #if __has_feature(cxx_noexcept)
47 typedef std::unordered_multiset<MoveOnly> C;
48 static_assert(std::is_nothrow_default_constructible<C>::value, "");
51 typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
52 std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
53 static_assert(std::is_nothrow_default_constructible<C>::value, "");
56 typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
57 std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
58 static_assert(!std::is_nothrow_default_constructible<C>::value, "");
61 typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
62 static_assert(!std::is_nothrow_default_constructible<C>::value, "");
65 typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
66 some_comp<MoveOnly>> C;
67 static_assert(!std::is_nothrow_default_constructible<C>::value, "");