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

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

πŸ’… std::ranges::adjacent_transform_view::iterator πŸ’…

okay bestie, welcome to the std::ranges::adjacent_transform_view::iterator page from the C++ Standard Library manual ✨ this one is niche but lowkey iconic, so let's get into it πŸ’–

πŸ’– NAME πŸ’–

std::ranges::adjacent_transform_view::iterator β€” std::ranges::adjacent_transform_view::iterator

✨ Synopsis ✨

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

so this is the return type of adjacent_transform_view::begin, and also of adjacent_transform_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.

πŸŽ€ Member types πŸŽ€

  • Parent (private) β€” const ranges::adjacent_transform_view, if Const is true. Otherwise, ranges::adjacent_transform_view. (exposition-only member type*)
  • Base (private) β€” const V, if Const is true. Otherwise, V. (exposition-only member type*)
  • iterator_category β€” here's the whole vibe check:
    • std::input_iterator_tag, if std::invoke_result_t</*maybe-const*/<Const, F>&, /*REPEAT*/(ranges::range_reference_t<Base>, N)...> is not a reference. Otherwise,
    • let C denote the type std::iterator_traits<iterator_t<Base>>::iterator_category.
      • std::random_access_iterator_tag, if std::derived_from<C, std::random_access_iterator_tag> is true. Otherwise,
      • std::bidirectional_iterator_tag, if std::derived_from<C, std::bidirectional_iterator_tag> is true. Otherwise,
      • std::forward_iterator_tag, if std::derived_from<C, std::forward_iterator_tag> is true. Otherwise,
      • std::input_iterator_tag.
  • iterator_concept β€” typename /*inner-iterator*/<Const>::iterator_concept;
  • value_type β€” std::remove_cvref_t<std::invoke_result_t</*maybe-const*/<Const, F>&, /*REPEAT*/(ranges::range_reference_t<Base>, N)...>>;
  • difference_type β€” ranges::range_difference_t<Base>

πŸ¦‹ Data members πŸ¦‹

  • parent_ (private) β€” a pointer of type Parent*. (exposition-only member object*)
  • inner_ (private) β€” an iterator of type inner_iterator. (exposition-only member object*)

🌸 Member functions 🌸

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

πŸ’… Non-member functions πŸ’…

  • operator==, operator<, operator>, operator<=, operator>=, operator<=> β€” compares the underlying iterators (function) (C++23)
  • operator+, operator- β€” performs iterator arithmetic (function) (C++23)

🌈 Example 🌈

This section is incomplete Reason: no example

no cap, we're all waiting on that example 🫢

⭐ References ⭐

  • C++23 standard (ISO/IEC 14882:2023):
  • 26.7.27.3 Class template adjacent_transform_view::iterator [range.adjacent_transform.iterator]

πŸ‘‘ See also πŸ‘‘

πŸ“ Category πŸ“

  • Todo no example

and that's the whole page bestie πŸ’– this cutie came from http://cppreference.com with the 2024.06.10 version/date β€” periodt βœ¨πŸ’…

πŸ“¦ where this page comes from