brintos

brintos / llvm-project-archived public Read only

0
0
Text · 890 B · 233a9c6 Raw
31 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// UNSUPPORTED: c++03, c++11, c++14, c++17, c++2010 11// <flat_map>12 13// flat_multimap& operator=(const flat_multimap& s);14 15// Validate whether the container can be copy-assigned (move-assigned, swapped)16// with an ADL-hijacking operator&17 18#include <flat_map>19#include <utility>20 21#include "test_macros.h"22#include "operator_hijacker.h"23 24void test() {25  std::flat_multimap<operator_hijacker, operator_hijacker> so;26  std::flat_multimap<operator_hijacker, operator_hijacker> s;27  s = so;28  s = std::move(so);29  swap(s, so);30}31