# std::match_results< _Bi_iter, _Allocator > Class Template Reference
[Regular Expressions]

Inheritance diagram for std::match_results< _Bi_iter, _Allocator >:

List of all members.

## Detailed Description

### template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>
class std::match_results< _Bi_iter, _Allocator >

A collection of character sequences representing the result of a regular expression match. Storage for the collection is allocated and freed as necessary by the member functions of class template match_results.

This class satisfies the Sequence requirements, with the exception that only the operations defined for a const-qualified Sequence are supported.

The sub_match object stored at index 0 represents sub-expression 0, i.e. the whole match. In this case the sub_match member matched is always true. The sub_match object stored at index n denotes what matched the marked sub-expression n within the matched expression. If the sub-expression n participated in a regular expression match then the sub_match member matched evaluates to true, and members first and second denote the range of characters [first, second) which formed that match. Otherwise matched is false, and members first and second point to the end of the sequence that was searched.

Definition at line 1624 of file tr1_impl/regex.

## Public Types

- typedef _Allocator allocator_type
- typedef iterator_traits< _Bi_iter
  >::value_type char_type
- typedef _Base_type::const_iterator const_iterator
- typedef _Allocator::const_reference const_reference
- typedef iterator_traits< _Bi_iter
  >::difference_type difference_type
- typedef const_iterator iterator
- typedef const_reference reference
- typedef _Allocator::size_type size_type
- typedef basic_string< char_type > string_type
- typedef sub_match< _Bi_iter > value_type

## Public Member Functions

- const_iterator begin () const
- bool empty () const
- const_iterator end () const
- string_type format (const string_type &__fmt, regex_constants::match_flag_type __flags=regex_constants::format_default) const
- template<typename _Out_iter> _Out_iter format (_Out_iter __out, const string_type &__fmt, regex_constants::match_flag_type __flags=regex_constants::format_default) const
- difference_type length (size_type __sub=0) const
- match_results (const match_results &__rhs)
- match_results (const _Allocator &__a=_Allocator())
- match_results & operator= (const match_results &__rhs)
- const_reference operator[] (size_type __n) const
- difference_type position (size_type __sub=0) const
- const_reference prefix () const
- size_type size () const
- string_type str (size_type __sub=0) const
- const_reference suffix () const
- void swap (match_results &__that)
- ~match_results ()

## Constructor & Destructor Documentation

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

std::match_results< _Bi_iter, _Allocator >::match_results | ( | const _Allocator & | __a = `_Allocator()` | ) | `[inline, explicit]`

Constructs a default match_results container.

Definition at line 1650 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

std::match_results< _Bi_iter, _Allocator >::match_results | ( | const match_results< _Bi_iter, _Allocator > & | __rhs | ) | `[inline]`

Copy constructs a match_result.

Definition at line 1657 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

std::match_results< _Bi_iter, _Allocator >::~match_results | ( |  | ) | `[inline]`

Todo:
  Implement this function.

Definition at line 1675 of file tr1_impl/regex.

## Member Function Documentation

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

const_iterator std::match_results< _Bi_iter, _Allocator >::begin | ( |  | ) | const`[inline]`

Todo:
  Document this function.

Reimplemented from std::vector< std::sub_match< _Bi_iter >, _Allocator >.

Definition at line 1751 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

bool std::match_results< _Bi_iter, _Allocator >::empty | ( |  | ) | const`[inline]`

Todo:
  Document this function.

Reimplemented from std::vector< std::sub_match< _Bi_iter >, _Allocator >.

Definition at line 1697 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

const_iterator std::match_results< _Bi_iter, _Allocator >::end | ( |  | ) | const`[inline]`

Todo:
  Document this function.

Reimplemented from std::vector< std::sub_match< _Bi_iter >, _Allocator >.

Definition at line 1758 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

string_type std::match_results< _Bi_iter, _Allocator >::format | ( | const string_type & | __fmt,
|  | regex_constants::match_flag_type | __flags = `regex_constants::format_default` |
| ) |  |  | const

Todo:
  Implement this function.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>
template<typename _Out_iter>

_Out_iter std::match_results< _Bi_iter, _Allocator >::format | ( | _Out_iter | __out,
|  | const string_type & | __fmt,
|  | regex_constants::match_flag_type | __flags = `regex_constants::format_default` |
| ) |  |  | const`[inline]`

Todo:
  Implement this function.

Definition at line 1767 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

difference_type std::match_results< _Bi_iter, _Allocator >::length | ( | size_type | __sub = `0` | ) | const`[inline]`

Gets the length of the indicated submatch.

Parameters:

  | sub | indicates the submatch.

Definition at line 1706 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

match_results& std::match_results< _Bi_iter, _Allocator >::operator= | ( | const match_results< _Bi_iter, _Allocator > & | __rhs | ) | `[inline]`

Assigns rhs to *this.

Definition at line 1666 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

const_reference std::match_results< _Bi_iter, _Allocator >::operator[] | ( | size_type | __n | ) | const`[inline]`

Todo:
  Document this function.

Definition at line 1730 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

difference_type std::match_results< _Bi_iter, _Allocator >::position | ( | size_type | __sub = `0` | ) | const`[inline]`

Todo:
  Document this function.

Definition at line 1713 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

const_reference std::match_results< _Bi_iter, _Allocator >::prefix | ( |  | ) | const`[inline]`

Todo:
  Document this function.

Definition at line 1737 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

size_type std::match_results< _Bi_iter, _Allocator >::size | ( |  | ) | const`[inline]`

Todo:
  Document this function.

Reimplemented from std::vector< std::sub_match< _Bi_iter >, _Allocator >.

Definition at line 1683 of file tr1_impl/regex.

Referenced by std::match_results< _Bi_iter >::empty().

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

string_type std::match_results< _Bi_iter, _Allocator >::str | ( | size_type | __sub = `0` | ) | const`[inline]`

Todo:
  Document this function.

Definition at line 1723 of file tr1_impl/regex.

Referenced by std::match_results< _Bi_iter >::length().

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

const_reference std::match_results< _Bi_iter, _Allocator >::suffix | ( |  | ) | const`[inline]`

Todo:
  Document this function.

Definition at line 1744 of file tr1_impl/regex.

template<typename _Bi_iter, typename _Allocator = allocator<sub_match<_Bi_iter> >>

void std::match_results< _Bi_iter, _Allocator >::swap | ( | match_results< _Bi_iter, _Allocator > & | __that | ) | `[inline]`

Todo:
  Document this function.

Definition at line 1793 of file tr1_impl/regex.

Referenced by std::match_results< _Bi_iter >::operator=(), and std::swap().

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

- tr1_impl/regex