std::revers...rse_iterator(3)
π NAME π
std::revers...rse_iterator::reverse_iterator β okay bestie, this is the constructor page, and the NAME is literally std::reverse_iterator::reverse_iterator. This page is from the C++ Standard Libary manual (spelling exactly as the manual says, not me π«Ά), and the whole page header vibe is std::revers...rse_iterator(3).
β¨ Synopsis β¨
Constructs a new iterator adaptor. The synopsis tokens are all here, un-mangled from the original line-wrap chaos:
reverse_iterator(); (until C++17)
constexpr reverse_iterator(); (since C++17)
explicit reverse_iterator( iterator_type x ); (until C++17)
constexpr explicit reverse_iterator( iterator_type x ); (since C++17) (1)
template< class U >
reverse_iterator( const reverse_iterator<U>& other ); (until C++17) (2)
template< class U >
constexpr reverse_iterator( const reverse_iterator<U>& other ); (since C++17) (3)
- 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. - The underlying iterator is initialized with that of
other. 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 πΈ
Okay so the Example section is not giving, bestie. It says, word for word:
This section is incomplete Reason: no example
π No example. None. Zero. The example section is literally on a break.
π¦ Defect reports π¦
The following behavior-changing defect reports were applied retroactively to previously published C++ standards:
LWG 235β Applied to:C++98; Behavior as published: the effect of the default constructor was not specified; Correct behavior: specified.LWG 1012β Applied to:C++98; Behavior as published: the underlying iterator was default-initialized; Correct behavior: it is value-initialized.LWG 3435β Applied to:C++20; Behavior as published: the converting constructor from anotherreverse_iteratorwas not constrained; Correct behavior: constrained.
π See also π
operator=β assigns another iterator adaptor (public member function)make_reverse_iterator(C++14) β creates astd::reverse_iteratorof type inferred from the argument (function template)
π·οΈ Category π·οΈ
Todo no example
Thatβs the whole page, bestie π The cute little source/version/date sign-off at the very end is: http://cppreference.com, 2024.06.10, std::revers...rse_iterator(3). Slay, bye β¨π
π¦ 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