std::ranges...ew::iterator(3)
π NAME π
std::ranges::cartesian_product_view::iterator β std::ranges::cartesian_product_view::iterator (yes, the page really names it twice, bestie). This is from the C++ Standard Libary manual, and itβs giving main-character iterator energy fr fr. π
β¨ SYNOPSIS β¨
template< bool Const > (since C++23)
class /*iterator*/ (exposition only*)
Okay so this is the return type of cartesian_product_view::begin, and of cartesian_product_view::end when the underlying view V is a common_range.
The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads. No cap. π«Ά
π§Έ MEMBER TYPES π§Έ
iterator_categoryβstd::input_iterator_tagiterator_conceptβ itβs a whole vibe check:std::random_access_iterator_tag, if/*cartesian-product-is-random-access*/<Const, First, Vs...>is modeled,std::bidirectional_iterator_tag, if/*cartesian-product-is-bidirectional*/<Const, First, Vs...>is modeled,std::forward_iterator_tag, if/*maybe-const*/<Const, First>modelsforward_range,std::input_iterator_tagotherwise.
value_typeβstd::tuple<ranges::range_value_t</*maybe-const*/<Const, First>>, ranges::range_value_t</*maybe-const*/<Const, Vs>>...>;referenceβstd::tuple<ranges::range_reference_t</*maybe-const*/<Const, First>>, ranges::range_reference_t</*maybe-const*/<Const, Vs>>...>;difference_typeβ an implementation-defined signed-integer-like type (maybe the smallest of such types), which is sufficiently wide to store the product of the maximum sizes of all underlying ranges, if such type exists.Parent(private) β/*maybe-const*/<Const, cartesian_product_view>. (exposition-only member type*)
π DATA MEMBERS π
parent_(private) β a pointer of typeParentto the parentcartesian_product_view. (exposition-only member object*)current_(private) β a tuple of iterators to the current underlying elements of type
std::tuple<ranges::iterator_t</*maybe-const*/<Const, First>>,
ranges::iterator_t</*maybe-const*/<Const, Vs>>...>
(exposition-only member object*)
π MEMBER FUNCTIONS π
constructor(C++23) β constructs an iterator (public member function)operator*(C++23) β accesses the element (public member function)operator[](C++23) β accesses an element by index (public member function)operator++,operator++(int),operator--,operator--(int)β advances or decrements the underlying iterator (public member function)operator+=,operator-=(C++23) β the page lists these with(C++23)and gives no extra description.next(C++23) β advances the iterator (exposition-only member function*)prev(C++23) β decrements the iterator (exposition-only member function*)distance_from(C++23) β returns the distance between two iterators (exposition-only member function*)
π NON-MEMBER FUNCTIONS π
operator==,operator<=>(C++23) β compares the underlying iterators (function)operator+,operator-(C++23) β performs iterator arithmetic (function)iter_move(C++23) β casts the result of dereferencing the underlying iterator to its associated rvalue reference type (function)iter_swap(C++23) β swaps underlying pointed-to elements (function)
π EXAMPLE π
This section is incomplete.
Reason: no example. π
π REFERENCES π
- C++23 standard (
ISO/IEC 14882:2023): 26.7.32.3Class templatecartesian_product_view::iterator[range.cartesian.iterator]
π SEE ALSO π
Category:
Todo no example
π
thatβs the whole page, bestie. Source/version: http://cppreference.com, 2024.06.10, page std::ranges...ew::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