|
|
| regex_token_iterator ()=default |
| | Constructs the end sentinel.
|
| |
| | regex_token_iterator (BidirIt first, BidirIt last, const regex_type &re, int submatch=0, regex_constants::match_flag_type flags=regex_constants::match_default) |
| | Selects a single sub-match field (0 = whole match, N = group N, -1 = split).
|
| |
| | regex_token_iterator (BidirIt first, BidirIt last, const regex_type &re, const std::vector< int > &submatches, regex_constants::match_flag_type flags=regex_constants::match_default) |
| | Selects a list of fields, cycled per match (e.g. {1, 2}, {-1}). The match flags are forwarded to the wrapped regex_iterator, so the nullable/honors routing is inherited.
|
| |
| | regex_token_iterator (BidirIt first, BidirIt last, const regex_type &re, std::initializer_list< int > submatches, regex_constants::match_flag_type flags=regex_constants::match_default) |
| | Selects a list of fields from a braced list (e.g. {-1}).
|
| |
|
| regex_token_iterator (BidirIt first, BidirIt last, const regex_type &&re, int submatch=0, regex_constants::match_flag_type flags=regex_constants::match_default)=delete |
| | Constructing from a temporary regex would dangle (std::regex_token_iterator parity).
|
| |
|
| regex_token_iterator (BidirIt first, BidirIt last, const regex_type &&re, const std::vector< int > &submatches, regex_constants::match_flag_type flags=regex_constants::match_default)=delete |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| reference | operator* () const |
| | The current token.
|
| |
| pointer | operator-> () const |
| | The current token.
|
| |
| regex_token_iterator & | operator++ () |
| | Advances to the next token, becoming the end sentinel when the fields are exhausted.
|
| |
| regex_token_iterator | operator++ (int) |
| | Advances to the next token, returning the previous position.
|
| |
| bool | operator== (const regex_token_iterator &other) const |
| | Equality. Two non-end iterators compare equal only for the same underlying walk, field selectors, field index, suffix state and current token.
|
| |
| bool | operator!= (const regex_token_iterator &other) const |
| | Inequality, the negation of operator==.
|
| |
template<typename BidirIt, typename CharT = typename std::iterator_traits<BidirIt>::value_type, typename Traits = std::regex_traits<CharT>>
class real::compat::regex_token_iterator< BidirIt, CharT, Traits >
Enumerates selected sub-matches (or the text between matches) — std::regex_token_iterator.
Wraps regex_iterator, so it inherits the per-operation nullable routing untouched (it never replays the engine choice). For each match it yields the requested fields in order: a field N >= 0 is capture group N (a non-participating group yields an empty matched == false token); the field -1 is the text before this match since the previous one — i.e. the match's prefix() — which turns -1 into a splitter. After the last match, a trailing -1 field yields the final suffix iff it is non-empty (std's rule; an empty field between adjacent matches is still produced, the asymmetry std pins). With -1 and no match at all, the whole sequence is the single token.
- Template Parameters
-
| BidirIt | A contiguous iterator into the searched sequence. |