1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03 && !stdlib=libc++
13 // Validate various member functions of std::vector with an ADL-hijacking operator&
18 #include "operator_hijacker.h"
19 #include "test_iterators.h"
21 using Vector
= std::vector
<operator_hijacker
>;
24 Vector v
, Vector::const_iterator it
, cpp17_input_iterator
<operator_hijacker
*> other_it
, operator_hijacker val
) {
28 v
.insert(it
, other_it
, other_it
);
29 v
.insert(it
, operator_hijacker());
38 v
= static_cast<Vector
&>(v
);
42 { Vector
v2(std::move(v
)); }
43 { Vector
v2(std::move(v
), std::allocator
<operator_hijacker
>()); }