|
|
| regex_iterator ()=default |
| | Constructs the end sentinel.
|
| |
| | regex_iterator (BidirIt first, BidirIt last, const regex_type &re, regex_constants::match_flag_type flags=regex_constants::match_default) |
| | Constructs a begin iterator over [first, last) and finds the first match.
|
| |
| | regex_iterator (const regex_iterator &other) |
| | Copies the iteration position but not the walker (an accelerator over real_pos_). Cloning its VM scratch, or sharing it copy-on-write, would cost every it++; a copy builds its own walker only if it advances.
|
| |
| regex_iterator & | operator= (const regex_iterator &other) |
| | Copy-assigns the iteration position, dropping any walker this iterator owned.
|
| |
|
| regex_iterator (regex_iterator &&) noexcept=default |
| | Moves the walker along with the position.
|
| |
| regex_iterator & | operator= (regex_iterator &&) noexcept=default |
| | Move-assigns, carrying the walker along with the position.
|
| |
|
| ~regex_iterator ()=default |
| | Releases the walker, if any.
|
| |
|
| regex_iterator (BidirIt first, BidirIt last, const regex_type &&re, regex_constants::match_flag_type flags=regex_constants::match_default)=delete |
| | Constructing from a temporary regex would dangle (std::regex_iterator parity).
|
| |
| reference | operator* () const |
| | The current match.
|
| |
| pointer | operator-> () const |
| | The current match.
|
| |
| regex_iterator & | operator++ () |
| | Advances to the next match, becoming the end sentinel when there is none.
|
| |
| regex_iterator | operator++ (int) |
| | Advances to the next match, returning the previous position.
|
| |
| bool | operator== (const regex_iterator &other) const |
| | Equality. Two non-end iterators compare equal only for the same regex, sequence, flags and current match — not for a coincidental same position across different patterns.
|
| |
| bool | operator!= (const regex_iterator &other) const |
| | Inequality, the negation of operator==.
|
| |
|
|
detail::subject_for< BidirIt > | subject_ |
| | Non-contiguous range: the copy REAL walks; declared before the walker, which views it.
|
| |
|
std::unique_ptr< walker_type > | walker_ |
| | Owned, never copied – see the copy constructor.
|
| |
|
BidirIt | begin_ {} |
| | Start of the sequence.
|
| |
|
BidirIt | end_ {} |
| | End of the sequence.
|
| |
|
const regex_type * | re_ {nullptr} |
| | The pattern, borrowed.
|
| |
|
regex_constants::match_flag_type | flags_ {regex_constants::match_default} |
| | Match flags this iteration was built with.
|
| |
|
bool | real_path_ {false} |
| | Whether the REAL engine drives the traversal rather than the std backend.
|
| |
|
std::size_t | real_pos_ {} |
| | REAL path: byte offset the next region search starts at.
|
| |
|
std::size_t | matched_ {} |
| | REAL path: matches made so far, saturating at 2 (only the first is retried without context).
|
| |
|
bool | last_empty_ {} |
| | REAL path: the current match is empty.
|
| |
|
std::optional< std::regex_iterator< BidirIt > > | std_it_ |
| | std path: the wrapped iterator (engaged only off the REAL path).
|
| |
|
value_type | match_ |
| | The current match, refilled by each increment.
|
| |
|
bool | at_end_ {true} |
| | Whether this is the end sentinel.
|
| |
template<typename BidirIt, typename CharT = typename std::iterator_traits<BidirIt>::value_type, typename Traits = std::regex_traits<CharT>>
class real::compat::regex_iterator< BidirIt, CharT, Traits >
Iterates the non-overlapping matches of a pattern in a sequence (std::regex_iterator).
REAL drives the traversal when basic_regex::uses_real_traversal holds and detail::real_honors accepts the flags; otherwise this wraps a std::regex_iterator. Default-constructed, it is the end sentinel.
- Template Parameters
-
| BidirIt | A bidirectional iterator into the searched sequence. |
template<typename BidirIt , typename CharT = typename std::iterator_traits<BidirIt>::value_type, typename Traits = std::regex_traits<CharT>>
template<typename RealMatch >
Makes result the current match, and the place the next one is searched from.
- Template Parameters
-
| RealMatch | A match with the subject's offsets. |
- Parameters
-
template<typename BidirIt , typename CharT = typename std::iterator_traits<BidirIt>::value_type, typename Traits = std::regex_traits<CharT>>
operator== between two live iterators.
Out of line so that operator== itself inlines: it != std::sregex_iterator() builds and compares an end sentinel at every step, and with this comparison inline clang kept the whole operator out of line.
- Parameters
-
| [in] | other | A live iterator. |
- Returns
- Whether both denote the same match of the same iteration.