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// <iterator>
10
11// move_iterator
12
13// template <class U>
14// requires !same_as<U, Iter> && convertible_to<const U&, Iter> && assignable_from<Iter&, const U&>
15// move_iterator& operator=(const move_iterator<U>& u);
16
17#include <iterator>
18
19struct Base { };
20struct Derived : Base { };
21
22void test() {
23 std::move_iterator<Base*> base;
24 std::move_iterator<Derived*> derived;
25 derived = base; // expected-error {{no viable overloaded '='}}
26}
27

source code of libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op=/assign.LWG3435.verify.cpp