std::regex_...rator++(int)(3)

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

πŸ’– std::regex_token_iterator::operator++,operator++(int) πŸ’–

okay bestie, welcome to the manual page std::regex_...rator++(int)(3) from the C++ Standard Libary manual. This is the iterator-increment situation and it's giving tiny state machine with rules, so let's go. ✨

🌸 NAME 🌸

std::regex_token_iterator::operator++,operator++(int) - std::regex_token_iterator::operator++,operator++(int)

That's the whole name, and yes it says it twice β€” iconic repetition. πŸ’…

✨ Synopsis ✨

regex_token_iterator& operator++();      (since C++11)
regex_token_iterator operator++( int );  (since C++11)

The vibe: Advances the iterator on the next sub match.

This section is incomplete β€” Reason: Explain better. For example, subs is an exposition-only vector of matched sub-expressions.

Here's the actual flow, bestie β€” follow it carefully:

  • If *this is a suffix iterator, sets *this to an end-of-sequence iterator. πŸ’€
  • Otherwise, if N + 1 < subs.size(), increments N and sets result to the address of the current match.
  • Otherwise, sets N to 0 and increments position. If position is not an end-of-sequence iterator, the operator sets result to the address of the current match.
  • Otherwise, if any of the values stored in subs is equal to -1 and prev->suffix().length() is not 0, the operator sets *this to a suffix iterator that points to the range [prev->suffix().first, prev->suffix().second).
  • Otherwise, sets *this to an end-of-sequence iterator.
⚠️ Danger, bestie: The behavior is undefined if the iterator is end-of-sequence iterator. Do not play with that.

πŸŽ€ Parameters πŸŽ€

(none) β€” literally none, bestie. No arguments, no drama. 🫢

πŸ¦‹ Return value πŸ¦‹

  1. *this
  2. The previous value of the iterator.

πŸ’€ Category: πŸ’€

* Todo with reason

Yep, that's the category. Todo with reason is the whole mood. πŸ™ˆ


kisses, bestie β€” source/version: http://cppreference.com, dated 2024.06.10, page std::regex_...rator++(int)(3) πŸ’–βœ¨

πŸ“¦ where this page comes from