std::ranges...ew::iterator(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so this is the page for std::ranges::join_with_view::iterator, and it lives in the C++ Standard Libary manual, section 3. ✨ It’s the iterator situation for join_with_view, and the actual star of the show is an exposition-only class template called /*iterator*/. πŸ’…


🌸 Synopsis 🌸

template< bool Const >  (since C++23)
class /*iterator*/      (exposition only*)

The return type of join_with_view::begin, and of join_with_view::end when both the outer range V and the inner range ranges::range_reference_t<V> satisfy common_range and the parent join_with_view is a forward_range.

If either V or Pattern is not a simple view, Const is true for iterators returned from the const overloads, and false otherwise. If V and Pattern are simple views, Const is true if and only if ranges::range_reference_t<V> is a reference. 🫢


πŸŽ€ Member types πŸŽ€

okay bestie, here’s the whole member-type cast β€” no crumbs left behind:

  • Parent β€” const join_view<V> if Const is true, otherwise join_view<V> (exposition-only member type*)
  • Base β€” const V if Const is true, otherwise V (exposition-only member type*)
  • InnerBase β€” ranges::range_reference_t<Base> (exposition-only member type*)
  • PatternBase β€” const Pattern if Const is true, otherwise Pattern (exposition-only member type*)
  • iterator_concept β€” one of these, depending on the vibe check:
    • std::bidirectional_iterator_tag, if:
      • ranges::range_reference_t<Base> is a reference type,
      • Base, InnerBase and PatternBase each model bidirectional_range,
      • and InnerBase and PatternBase each model common_range;
    • std::forward_iterator_tag, if:
      • ranges::range_reference_t<Base> is a reference type, and
      • Base and InnerBase each model forward_range;
    • std::input_iterator_tag otherwise.
  • iterator_category β€” defined only if iterator::iterator_concept (see above) denotes std::forward_iterator_tag. Let OUTERC be std::iterator_traits<ranges::iterator_t<Base>>::iterator_category, INNERC be std::iterator_traits<ranges::iterator_t<InnerBase>>::iterator_category, and PATTERNC be std::iterator_traits<ranges::iterator_t<PatternBase>>::iterator_category.
    • std::input_iterator_tag, if std::common_reference_t<ranges::range_reference_t<InnerBase>, ranges::range_reference_t<PatternBase>> is not a reference type;
    • std::bidirectional_iterator_tag, if:
      • OUTERC, INNERC, and PATTERNC each model std::derived_from<std::bidirectional_iterator_tag> and
      • ranges::range_reference_t<Base> and PatternBase each model common_range;
    • std::forward_iterator_tag, if OUTERC, INNERC, and PATTERNC each model std::derived_from<std::forward_iterator_tag>;
    • std::input_iterator_tag otherwise.
  • value_type β€” std::common_type_t<ranges::range_value_t<InnerBase>, ranges::range_value_t<PatternBase>>
  • difference_type β€” std::common_type_t<ranges::range_difference_t<Base>, ranges::range_difference_t<InnerBase>, ranges::range_difference_t<PatternBase>>

πŸ’… Member functions πŸ’…

  • constructor β€” constructs an iterator (public member function) (C++23)
  • operator* β€” accesses the element (public member function) (C++23)
  • operator++, operator++(int), operator--, operator--(int) β€” advances or decrements the underlying iterator (public member function) (C++23)

πŸ¦‹ Non-member functions πŸ¦‹

  • operator== β€” compares the underlying iterators (function) (C++23)
  • iter_move β€” casts the result of dereferencing the underlying iterator to its associated rvalue reference type (function) (C++23)
  • iter_swap β€” swaps the objects pointed to by two underlying iterators (function) (C++23)

and that’s the whole page, bestie 🫢 source: http://cppreference.com, page date: 2024.06.10, for std::ranges...ew::iterator(3). πŸ’–

πŸ“¦ where this page comes from