std::ranges...::operator++(3)

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

okay bestie, this is the std::ranges...::operator++(3) page from the C++ Standard Libary manual (their spelling, not mine πŸ’…), and we're about to make std::ranges::chunk_view::inner-iterator::operator++ make sense. Group-chat mode: on 🫢✨

🌸 NAME 🌸

std::ranges::chunk_view::inner-iterator::operator++ - std::ranges::chunk_view::inner-iterator::operator++

That's the whole NAME, bestie β€” yes, it's giving "said it twice because it's iconic" πŸ’…βœ¨

✨ Synopsis ✨

          constexpr /*inner-iterator*/& operator++(); (1) (since C++23)
          constexpr void operator++( int );           (2) (since C++23)

Increments the iterator. Simple queen behavior πŸ”₯

Let parent_ be the underlying pointer to enclosing chunk_view.

1) Equivalent to:

        ++*parent_->current_;
        if (*parent_->current_ == ranges::end(parent_->base_))
            parent_->remainder_ = 0;
        else
            --parent_->remainder_;
        return *this;

Before invocation of this operator the expression *this == std::default_sentinel must be false. Like, must be false, no cap 😭

2) Equivalent to ++*this.

πŸ’œ Parameters πŸ’œ

(none) β€” literally zero parameters, we love a low-maintenance icon 🫢

πŸŽ€ Return value πŸŽ€

  1. *this
  2. (none)

Overload (1) hands you back *this; overload (2) returns (none), periodt πŸ’–

πŸ¦‹ Example πŸ¦‹

This section is incomplete Reason: no example

Tragic, I know β€” the example section is incomplete and the reason is literally no example 😭

🌈 See also 🌈

  • operator- β€” calculates the number of chunks remained (C++23) (function)

πŸ“ Category πŸ“

  • * Todo no example

mwah πŸ’‹ this footer came straight from http://cppreference.com, stamped with version/date 2024.06.10, and it's the std::ranges...::operator++(3) page β€” slay, bye bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from