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_map() // implied noexcept;
14 // UNSUPPORTED: c++98, c++03
16 #include <unordered_map>
20 #include "test_allocator.h"
26 ~some_comp() noexcept(false);
27 bool operator()(const T&, const T&) const { return false; }
35 some_hash(const some_hash&);
36 ~some_hash() noexcept(false);
42 typedef std::unordered_map<MoveOnly, MoveOnly> C;
43 static_assert(std::is_nothrow_destructible<C>::value, "");
46 typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
47 std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
48 static_assert(std::is_nothrow_destructible<C>::value, "");
51 typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
52 std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
53 static_assert(std::is_nothrow_destructible<C>::value, "");
56 typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
57 static_assert(!std::is_nothrow_destructible<C>::value, "");
60 typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
61 some_comp<MoveOnly>> C;
62 static_assert(!std::is_nothrow_destructible<C>::value, "");