std::ranges...or::iterator(3)
Okay bestie, welcome to the std::ranges...or::iterator(3) page from the C++ Standard Library β todayβs main character is std::ranges::slide_view::iterator::iterator, and weβre getting into constructor lore. π
β¨
πΈ NAME πΈ
std::ranges::slide_view::iterator::iterator β std::ranges::slide_view::iterator::iterator
β¨ Synopsis β¨
/*iterator*/(); (1)
(since C++23)
constexpr /*iterator*/( /*iterator*/<!Const> i )
requires Const && (2)
(since C++23)
std::convertible_to<ranges::iterator_t<V>,
ranges::iterator_t<Base>>
private:
constexpr /*iterator*/( ranges::iterator_t<Base> current, (3)
(exposition only*)
ranges::range_difference_t<Base> n )
requires (!/*slide-caches-first*/<Base>);
private:
constexpr /*iterator*/( ranges::iterator_t<Base> current,
ranges::iterator_t<Base> last_ele, (4)
(exposition only*)
ranges::range_difference_t<Base> n )
requires /*slide-caches-first*/<Base>;
Construct an iterator. π«Ά Hereβs the rundown, constructor by constructor:
- Default constructor. Value-initializes the underlying data members:
current_withranges::iterator_t<Base>(),last_ele_withranges::iterator_t<Base>()(note that this member may not be present),n_with0.
- Conversion from
/*iterator*/<false>to/*iterator*/<true>. Initializes the underlying data members:current_withstd::move(i.current_),n_withi.n_.
Note that /*iterator*/<true> can only be formed when Base models /*slide-caches-nothing*/, in which case last_ele_ is not present.
- A private constructor which is used by
ranges::slide_view::beginandranges::slide_view::end. This constructor is not accessible to users. It initializes the underlying data members:current_withcurrent,n_withn.
Note that this overload can only be present if last_ele_ is not present. Itβs also marked exposition only in the synopsis, bestie. π
- A private constructor which is used by
ranges::slide_view::beginandranges::slide_view::end. This constructor is not accessible to users. It initializes the underlying data members:current_withcurrent,last_ele_withlast_ele(note that this data member is present due to/*slide-caches-first*/<Base>requirement),n_withn.
Itβs marked exposition only in the synopsis too. π
π Parameters π
iβ an/*iterator*/<false>currentβ an iterator to current element ofslide_viewlast_eleβ an iterator to last element ofslide_viewnβ the slide window width ofslide_view
π¦ Example π¦
This section is incomplete.
Reason: no example π
π Category π
- Todo no example
Sourced from http://cppreference.com, dated 2024.06.10, and filed under std::ranges...or::iterator(3) β bye bestie, go slay those iterators! πβ¨π«Ά
π¦ 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