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 // <unordered_map>
10
11 // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
12 // class Alloc = allocator<pair<const Key, T>>>
13 // class unordered_map
14
15 // unordered_map& operator=(const unordered_map& u);
16
17 // Validate whether the container can be copy-assigned with an ADL-hijacking operator&
18
19 #include <unordered_map>
20
21 #include "test_macros.h"
22 #include "operator_hijacker.h"
23
test()24 void test() {
25 {
26 std::unordered_map<int, operator_hijacker> mo;
27 std::unordered_map<int, operator_hijacker> m;
28 m = mo;
29 }
30 {
31 std::unordered_map<operator_hijacker, int> mo;
32 std::unordered_map<operator_hijacker, int> m;
33 m = mo;
34 }
35 }
36