std::move_i...r::operator=(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

std::move_iterator::operator= - std::move_iterator::operator=

okay so bestie, welcome to the C++ Standard Libary manual page std::move_i...r::operator=(3) πŸ’… this one is literally the assignment operator for std::move_iterator, and yes the name repeats because that’s how the page is set up. no cap.


✨ SYNOPSIS ✨

          template< class U >
       (until C++17)
          move_iterator& operator=( const move_iterator<U>& other );
          template< class U >
       (since C++17)
          constexpr move_iterator& operator=( const move_iterator<U>& other );

The underlying iterator is assigned the value of the underlying iterator of other, i.e. other.base(). 🫢

⚠️ UB warning: The behavior is undefined if U is not convertible to Iter. like, that’s undefined behavior, bestie 😭

(until C++20) This overload participates in overload resolution only if U is not the same type as Iter and std::convertible_to<const U&, Iter> and (since C++20) std::assignable_from<Iter&, const U&> are modeled. ✨


πŸŽ€ PARAMETERS πŸŽ€

  • other β€” iterator adaptor to assign.

πŸ’– RETURN VALUE πŸ’–

*this β€” that’s the return, bestie. πŸ‘‘


πŸ¦‹ EXAMPLE πŸ¦‹

This section is incomplete. Reason: no example. 😭 no example yet, but the page says it, not me.


πŸ”₯ DEFECT REPORTS πŸ”₯

The following behavior-changing defect reports were applied retroactively to previously published C++ standards. πŸ‘‘

  • DR: LWG 3435 β€” Applied to: C++20 β€” Behavior as published: the converting assignment operator was not constrained β€” Correct behavior: constrained.

🌈 SEE ALSO 🌈

  • constructor β€” constructs a new iterator adaptor (C++11) (public member function).

πŸ“ CATEGORY πŸ“

Category: * Todo no example


mwah πŸ’‹ that’s the whole page, bestie. source: http://cppreference.com, version/date: 2024.06.10, page: std::move_i...r::operator=(3). 🫢✨

πŸ“¦ where this page comes from