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 | // <list> |
10 | |
11 | // template <class Compare> void merge(list& x, Compare comp); |
12 | // If (addressof(x) == this) does nothing; otherwise ... |
13 | |
14 | // Validate whether the operation properly guards against ADL-hijacking operator& |
15 | |
16 | #include <list> |
17 | |
18 | #include "test_macros.h" |
19 | #include "operator_hijacker.h" |
20 | |
21 | void test() { |
22 | std::list<operator_hijacker> l; |
23 | l.merge(l, std::less<operator_hijacker>()); |
24 | } |
25 | |