template< class U > move_iterator& operator=( const move_iterator<U>& other ); | (until C++17) | |
template< class U > constexpr move_iterator& operator=( const move_iterator<U>& other ); | (since C++17) |
The underlying iterator is assigned the value of the underlying iterator of other
, i.e. other.base()
.
The behavior is undefined if U is not convertible to Iter . | (until C++20) |
This overload participates in overload resolution only if | (since C++20) |
other | - | iterator adaptor to assign |
*this
.
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 3435 | C++20 | the converting assignment operator was not constrained | constrained |
(C++11) | constructs a new iterator adaptor (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/iterator/move_iterator/operator%3D