std::regex_...rator++(int)(3)
π 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
*thisis a suffix iterator, sets*thisto an end-of-sequence iterator. π - Otherwise, if
N + 1 < subs.size(), incrementsNand setsresultto the address of the current match. - Otherwise, sets
Nto0and incrementsposition. Ifpositionis not an end-of-sequence iterator, the operator setsresultto the address of the current match. - Otherwise, if any of the values stored in
subsis equal to-1andprev->suffix().length()is not0, the operator sets*thisto a suffix iterator that points to the range[prev->suffix().first, prev->suffix().second). - Otherwise, sets
*thisto 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 π¦
*this- 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
- 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