1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
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
15 // Validate the constructors of the (const)(_local)_iterator classes to be
16 // properly guarded against ADL-hijacking operator&.
18 #include <unordered_map>
20 #include "test_macros.h"
21 #include "operator_hijacker.h"
23 template <class ToIterator
, class FromIterator
>
26 ToIterator
copy(from
);
29 ToIterator
move(std::move(from
));
30 from
= FromIterator();
31 move
= std::move(from
);
36 using I
= std::unordered_map
<operator_hijacker
, operator_hijacker
>::iterator
;
37 using CI
= std::unordered_map
<operator_hijacker
, operator_hijacker
>::const_iterator
;
43 using IL
= std::unordered_map
<operator_hijacker
, operator_hijacker
>::local_iterator
;
44 using CIL
= std::unordered_map
<operator_hijacker
, operator_hijacker
>::const_local_iterator
;