| Localization library | |||||||||||||||||||||||||
| Regular expressions library(C++11) | |||||||||||||||||||||||||
| Formatting library(C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| Classes | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Algorithms | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Iterators | ||||
(C++11) | ||||
(C++11) | ||||
| Exceptions | ||||
(C++11) | ||||
| Traits | ||||
(C++11) | ||||
| Constants | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Regex Grammar | ||||
(C++11) |
| Member functions | ||||
| Comparisons | ||||
(until C++20) | ||||
| Observers | ||||
| Modifiers | ||||
regex_iterator::operator++regex_iterator::operator++(int) |
regex_iterator& operator++(); | (since C++11) | |
regex_iterator operator++(int); | (since C++11) | |
Advances the iterator on the next match.
| This section is incomplete Reason: explain better |
At first, a local variable of typeBidirIt is constructed with the value ofmatch[0].second.
If the iterator holds a zero-length match andstart== end,*this is set to end-of-sequence iterator and the function returns.
Otherwise, if the iterator holds a zero-length match the operator invokes the following:
regex_search(start, end, match,*pregex,
flags| regex_constants::match_not_null|
regex_constants::match_continuous);
If the call returnstrue, the function returns.
Otherwise the operator incrementsstart and continues as if the most recent match was not a zero-length match.
If the most recent match was not a zero-length match, the operator setsflags toflags| regex_constants::match_prev_avail and invokes the following:
regex_search(start, end, match,*pregex, flags);
If the call returnsfalse, the iterator sets*this to the end-of-sequence iterator, the function returns.
In all cases in which the call toregex_search returnstrue,match.prefix().first will be equal to the previous value ofmatch[0].second and for each index i in the range[0, match.size()) for whichmatch[i].matched istrue,match[i].position() will returndistance(begin, match[i].first).
This means thatmatch[i].position() gives the offset from the beginning of the target sequence, which is often not the same as the offset from the sequence passed in the call toregex_search.
It is unspecified how the implementation makes these adjustments. This means that a compiler may call an implementation-specific search function, in which case a user-defined specialization ofregex_search will not be called.
The behavior is undefined if the iterator is end-of-sequence iterator.
(none)