libstdc++: std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > Class Template Reference

libstdc++

std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > Class Template Reference
Regular Expressions

`#include <regex>`

## Public Types
typedef std::ptrdiff_t | difference_type
typedef std::forward_iterator_tag | iterator_category
typedef std::input_iterator_tag | iterator_concept
typedef const value_type * | pointer
typedef const value_type & | reference
typedef basic_regex< _Ch_type, _Rx_traits > | regex_type
typedef match_results< _Bi_iter > | value_type

## Public Member Functions
| regex_iterator ()=default
| regex_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, regex_constants::match_flag_type __m=regex_constants::match_default)
| regex_iterator (_Bi_iter, _Bi_iter, const regex_type &&, regex_constants::match_flag_type=regex_constants::match_default)=delete
| regex_iterator (const regex_iterator &)=default
const value_type & | operator* () const noexcept
regex_iterator & | operator++ ()
regex_iterator | operator++ (int)
const value_type * | operator-> () const noexcept
regex_iterator & | operator= (const regex_iterator &)=default
bool | operator== (const regex_iterator &) const noexcept
bool | operator== (default_sentinel_t) const noexcept

## Detailed Description

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>
class std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >

An iterator adaptor that will provide repeated calls of regex_search over a range until no more matches remain.

Since
  C++11

Definition at line 2756 of file regex.h.

## Member Typedef Documentation

## ◆ difference_type

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef std::ptrdiff_t std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::difference_type

Definition at line 2761 of file regex.h.

## ◆ iterator_category

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef std::forward_iterator_tag std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::iterator_category

Definition at line 2764 of file regex.h.

## ◆ iterator_concept

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef std::input_iterator_tag std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::iterator_concept

Definition at line 2766 of file regex.h.

## ◆ pointer

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef const value_type* std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::pointer

Definition at line 2762 of file regex.h.

## ◆ reference

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef const value_type& std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::reference

Definition at line 2763 of file regex.h.

## ◆ regex_type

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef basic_regex<_Ch_type, _Rx_traits> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_type

Definition at line 2759 of file regex.h.

## ◆ value_type

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

typedef match_results<_Bi_iter> std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::value_type

Definition at line 2760 of file regex.h.

## Constructor & Destructor Documentation

## ◆ regex_iterator() [1/3]

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator | ( |  | ) |
| default

Provides a singular iterator, useful for indicating one-past-the-end of a range.

Referenced by std::regex_iterator< const char * >::regex_iterator(), and operator==().

## ◆ regex_iterator() [2/3]

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator | ( | _Bi_iter | __a,
|  | _Bi_iter | __b,
|  | const regex_type & | __re,
|  | regex_constants::match_flag_type | __m = regex_constants::match_default )
| inline

Constructs a regex_iterator...

Parameters

  __a | [IN] The start of a text range to search.
  __b | [IN] One-past-the-end of the text range to search.
  __re | [IN] The regular expression to match.
  __m | [IN] Policy flags for match rules.

Definition at line 2782 of file regex.h.

## ◆ regex_iterator() [3/3]

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::regex_iterator | ( | const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > & |  | ) |
| default

Copy constructs a regex_iterator.

## Member Function Documentation

## ◆ operator*()

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

const value_type & std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator* | ( |  | ) | const
| inlinenoexcept

Dereferences a regex_iterator.

Definition at line 2832 of file regex.h.

## ◆ operator++() [1/2]

template<typename _Bi_iter, typename _Ch_type, typename _Rx_traits>

regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > & std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ | ( |  | ) |

Increments a regex_iterator.

Definition at line 616 of file regex.tcc.

References std::regex_constants::match_continuous, std::regex_constants::match_not_null, std::regex_constants::match_prev_avail, and std::regex_search().

## ◆ operator++() [2/2]

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

regex_iterator std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator++ | ( | int |  | ) |
| inline

Postincrements a regex_iterator.

Definition at line 2852 of file regex.h.

## ◆ operator->()

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

const value_type * std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator-> | ( |  | ) | const
| inlinenoexcept

Selects a regex_iterator member.

Definition at line 2839 of file regex.h.

## ◆ operator=()

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

regex_iterator & std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator= | ( | const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > & |  | ) |
| default

Copy assigns one regex_iterator to another.

## ◆ operator==() [1/2]

template<typename _Bi_iter, typename _Ch_type, typename _Rx_traits>

bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== | ( | const regex_iterator< _Bi_iter, _Ch_type, _Rx_traits > & | __rhs | ) | const
| noexcept

Tests the equivalence of two regex iterators.

Definition at line 600 of file regex.tcc.

References regex_iterator().

## ◆ operator==() [2/2]

template<typename _Bi_iter, typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type, typename _Rx_traits = regex_traits<_Ch_type>>

bool std::regex_iterator< _Bi_iter, _Ch_type, _Rx_traits >::operator== | ( | default_sentinel_t |  | ) | const
| inlinenoexcept

Definition at line 2815 of file regex.h.

The documentation for this class was generated from the following files:

- regex.h
- regex.tcc