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// <vector>
10
11// template <class Iter>
12// iterator insert(const_iterator position, Iter first, Iter last);
13
14// Validate whether the container can be copy-assigned with an ADL-hijacking operator&
15
16#include <vector>
17
18#include "test_macros.h"
19#include "operator_hijacker.h"
20#include "test_iterators.h"
21
22void test(cpp17_input_iterator<operator_hijacker*> i) {
23 {
24 std::vector<operator_hijacker> v;
25 v.insert(v.end(), i, i);
26 }
27 {
28 std::vector<operator_hijacker> v;
29 v.insert(v.end(), v.begin(), v.end());
30 }
31}
32

source code of libcxx/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.addressof.compile.pass.cpp