| 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 | // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 |
| 10 | |
| 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 | |
| 24 | void 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 | |