std::ranges...or::iterator(3)
πΈ NAME πΈ
std::ranges::transform_view::iterator::iterator β bestie, it's the constructor of the iterator of std::ranges::transform_view::iterator. Say that five times fast, iykyk π
β¨ Synopsis β¨
Ok so there are three of these bad boys, and they're all constexpr coded (except the first line as shown, don't come for me, I'm transcribing exactly). All of them are since C++20, slay β¨
/*iterator*/() requires
std::default_initializable<ranges::iterator_t<Base>> = default; (1) (since C++20)
constexpr /*iterator*/( Parent& parent, ranges::iterator_t<Base> current ); (2) (since C++20)
constexpr /*iterator*/( /*iterator*/<!Const> i )
requires Const &&
std::convertible_to<ranges::iterator_t<V>, ranges::iterator_t<Base>>; (3) (since C++20)
Construct an iterator. That's literally the whole vibe π«Ά
- Default constructor. Value-initializes the underlying iterator, and initializes the pointer to parent
transform_viewwithnullptr. Clean slate energy, no notes π - Initializes the underlying iterator with
std::move(current), and the pointer to parent withstd::addressof(parent). Giving it a home and a place to belong, we love to see it π₯Ή - Conversion from
/*iterator*/<false>to/*iterator*/<true>. Move constructs corresponding members. Glow-up arc, main character energy π
π Parameters π
parentβ a (possibly const-qualified)std::ranges::transform_viewcurrentβ an iterator into (possibly const-qualified)Viβ an/*iterator*/<false>
π Example π
This section is incomplete Reason: no example
Not me showing up with zero example π the page literally says it's incomplete. We'll get 'em next time, fr fr π
β Category β
- Todo: no example
Lowkey the whole todo list is just "add an example" and honestly? Same. π
And that's the whole page, bestie β no cap, every flag, every signature, every parameter, all accounted for π
Source: http://cppreference.com Β· version/date 2024.06.10 Β· filed under std::ranges...or::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