xref: /llvm-project/libcxx/test/std/containers/sequences/list/list.special/swap.addressof.compile.pass.cpp (revision 4732dd301086ce056d869eded4e1543fcb45506d)
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 T, class Alloc>
12 //   void swap(list<T,Alloc>& x, list<T,Alloc>& y);
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 
test()21 void test() {
22   std::list<operator_hijacker> lo;
23   std::list<operator_hijacker> l;
24   swap(l, lo);
25 }
26