brintos

brintos / llvm-project-archived public Read only

0
0
Text · 726 B · 0e15d16 Raw
26 lines · cpp
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-exception6//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 21void test() {22  std::list<operator_hijacker> lo;23  std::list<operator_hijacker> l;24  swap(l, lo);25}26