1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // UNSUPPORTED: c++03
10
11 // <unordered_set>
12
13 // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
14 // class Alloc = allocator<Value>>
15 // class unordered_multiset
16
17 // Validate whether the operation properly guards against ADL-hijacking operator&
18
19 #include <unordered_set>
20
21 #include "test_allocator.h"
22 #include "test_macros.h"
23 #include "operator_hijacker.h"
24
test()25 void test() {
26 using A = test_allocator<operator_hijacker>;
27 using H = std::hash<operator_hijacker>;
28 using P = std::equal_to<operator_hijacker>;
29
30 const A a;
31 std::unordered_multiset<operator_hijacker, H, P, A> so;
32 std::unordered_multiset<operator_hijacker, H, P, A> s(std::move(so), a);
33 }
34