31 Regular expressions library [re]

31.12 Regular expression iterators [re.iter]

31.12.2 Class template regex_­token_­iterator [re.tokiter]

31.12.2.1 regex_­token_­iterator constructors [re.tokiter.cnstr]

regex_token_iterator();
Effects: Constructs the end-of-sequence iterator.
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default); regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const vector<int>& submatches, regex_constants::match_flag_type m = regex_constants::match_default); regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, initializer_list<int> submatches, regex_constants::match_flag_type m = regex_constants::match_default); template <size_t N> regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const int (&submatches)[N], regex_constants::match_flag_type m = regex_constants::match_default);
Requires: Each of the initialization values of submatches shall be >= -1.
Effects: The first constructor initializes the member subs to hold the single value submatch.
The second constructor initializes the member subs to hold a copy of the argument submatches.
The third and fourth constructors initialize the member subs to hold a copy of the sequence of integer values pointed to by the iterator range [submatches.begin(), submatches.end()) and [&submatches, &submatches + N), respectively.
Each constructor then sets N to 0, and position to position_­iterator(a, b, re, m).
If position is not an end-of-sequence iterator the constructor sets result to the address of the current match.
Otherwise if any of the values stored in subs is equal to -1 the constructor sets *this to a suffix iterator that points to the range [a, b), otherwise the constructor sets *this to an end-of-sequence iterator.