std::move_i...ove_iterator(3)
okay bestie, welcome to std::move_iterator::move_iterator β page label std::move_i...ove_iterator(3) from the C++ Standard Libary manual (yes, thatβs how itβs spelled in the header, Iβm not fixing it ππ
).
πΈ NAME πΈ
std::move_iterator::move_iterator β the constructor for a std::move_iterator, literally living the βsame name twiceβ icon life. It constructs a new iterator adaptor, bestie. β¨
β¨ Synopsis β¨
The synopsis line wraps are giving chaotic manual formatting, but the tokens are sacred π«Ά:
move_iterator(); (until C++17)
constexpr move_iterator(); (since C++17)
explicit move_iterator( (until
C++17)
iterator_type x );
constexpr explicit move_iterator( (since
C++17)
iterator_type x ); (1)
template< class U > (2)
move_iterator( const
(until C++17)
move_iterator<U>& other ); (3)
template< class U >
constexpr move_iterator( const
(since C++17)
move_iterator<U>& other );
Constructs a new iterator adaptor. Slay. π
- Default constructor. The underlying iterator is value-initialized. Operations on the resulting iterator have defined behavior if and only if the corresponding operations on a value-initialized
Iteralso have defined behavior. - The underlying iterator is initialized with
x(until C++20)std::move(x)(since C++20). - The underlying iterator is initialized with that of
other. The behavior is undefined ifUis not convertible toIter(until C++20). This overload participates in overload resolution only ifUis not the same type asIterandstd::convertible_to<const U&, Iter>is modeled (since C++20).
π Parameters π
xβ iterator to adaptotherβ iterator adaptor to copy
π Example π
This section is incomplete. Reason: no example. π The page is literally tagged * Todo no example, so no example bestie, thatβs the whole tea. π«
π 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 constructor from anothermove_iteratorwas not constrained; Correct behavior: constrained.
π¦ See also π¦
operator=β assigns another iterator adaptor (C++11) (public member function)make_move_iteratorβ creates astd::move_iteratorof type inferred from the argument (C++11) (function template)
π Category π
* Todo no exampleβ the category tag on the page, no cap.
okay bye bestie π β source/version: http://cppreference.com; date: 2024.06.10; page tag: std::move_i...ove_iterator(3). π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms