std::ranges...or::iterator(3)
NAME π
Okay bestie, welcome to the C++ Standard Libary manual page for std::ranges...or::iterator(3) β and the NAME section is doing that iconic double-tap: std::ranges::chunk_view::iterator::iterator β std::ranges::chunk_view::iterator::iterator. That's the name, and the description is literally the same thing. periodt. π
Synopsis β¨
This is the constructor synopsis, and every line, every requires, and every little annotation is staying exactly as it appears. No cap. π¦
/*iterator*/() = default; (1)
(since C++23)
constexpr /*iterator*/( /*iterator*/<!Const> i )
requires
Const and
std::convertible_to<ranges::iterator_t<V>, (2)
(since C++23)
ranges::iterator_t<Base>> and
std::convertible_to<ranges::sentinel_t<V>,
ranges::sentinel_t<Base>>;
private:
constexpr /*iterator*/( Parent* parent,
ranges::iterator_t<Base> current, (3)
(exposition only*)
ranges::range_difference_t<Base>
missing = 0 );
Construct an iterator. That's the whole mood of this page: we're constructing an iterator, and there are three flavors. π«Ά
- Default constructor β
/*iterator*/() = default;is(1), and it's(since C++23). It value-initializes the underlying data members:current_withranges::iterator_t<Base>()end_withranges::sentinel_t<Base>()n_with0missing_with0
- Conversion constructor β
constexpr /*iterator*/( /*iterator*/<!Const> i )is(2), and it's also(since C++23). It converts from/*iterator*/<false>to/*iterator*/<true>. Itsrequiresclause is:Const andstd::convertible_to<ranges::iterator_t<V>, ranges::iterator_t<Base>> andstd::convertible_to<ranges::sentinel_t<V>, ranges::sentinel_t<Base>>
It initializes the underlying data members:
current_withstd::move(i.current_)end_withstd::move(i.end_)n_withi.n_missing_withi.missing_
- Private constructor β item
(3), marked(exposition only*). It's the private one used byranges::chunk_view::beginandranges::chunk_view::end. Themissingparameter defaults to0. This constructor is not accessible to users β read it and weep, lol. π It initializes the underlying data members:current_withcurrentend_withranges::end(parent->base_)n_withparent->n_missing_withmissing
Wait, did we lose the missing = 0 default? Nope β it's right there in the constructor signature and it's staying. π«Ά
Parameters π
iβ an/*iterator*/<false>parentβ a pointer to owningchunk_viewcurrentβ an iterator to the begin of current chunkmissingβ a difference between expected (n_) and actual size of current chunk
Example π
This section is incomplete Reason: no example
Category π
Todo no example
Mwah π β source/version: http://cppreference.com; date: 2024.06.10; page: std::ranges...or::iterator(3). Stay hydrated and keep those iterators constructed. π
π¦ 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