libstdc++
std::match_results< _Bi_iter, _Alloc > Class Template Reference
Inheritance diagram for std::match_results< _Bi_iter, _Alloc >:
[legend]

Public Member Functions

template<typename _Out_iter >
_Out_iter format (_Out_iter __out, const match_results< _Bi_iter, _Alloc >::char_type *__fmt_first, const match_results< _Bi_iter, _Alloc >::char_type *__fmt_last, match_flag_type __flags) const
 

Private Member Functions

iterator begin () noexcept
 
iterator end () noexcept
 
allocator_type get_allocator () const noexcept
 
const_reference operator[] (size_type __n) const noexcept
 
reference operator[] (size_type __n) noexcept
 
void swap (vector &__x) noexcept
 

10.? Public Types

typedef sub_match< _Bi_iter > value_type
 
typedef const value_typeconst_reference
 
typedef value_typereference
 
typedef _Base_type::const_iterator const_iterator
 
typedef const_iterator iterator
 
typedef __iter_traits::difference_type difference_type
 
typedef allocator_traits< _Alloc >::size_type size_type
 
typedef _Alloc allocator_type
 
typedef __iter_traits::value_type char_type
 
typedef std::basic_string< char_type > string_type
 

10.6 Swap

template<typename , typename , typename , bool >
class __detail::_Executor
 
template<typename , typename , typename >
class regex_iterator
 
template<typename _Bp , typename _Ap , typename _Cp , typename _Rp , __detail::_RegexExecutorPolicy , bool >
bool __detail::__regex_algo_impl (_Bp, _Bp, match_results< _Bp, _Ap > &, const basic_regex< _Cp, _Rp > &, regex_constants::match_flag_type)
 
void swap (match_results &__that) noexcept
 

28.10.1 Construction, Copying, and Destruction

 match_results ()
 
 match_results (const _Alloc &__a) noexcept
 
 match_results (const match_results &)=default
 
 match_results (match_results &&) noexcept=default
 
match_resultsoperator= (const match_results &)=default
 
match_resultsoperator= (match_results &&)=default
 
 ~match_results ()=default
 
bool ready () const noexcept
 

28.10.2 Size

size_type size () const noexcept
 
size_type max_size () const noexcept
 
_GLIBCXX_NODISCARD bool empty () const noexcept
 

10.3 Element Access

difference_type length (size_type __sub=0) const
 
difference_type position (size_type __sub=0) const
 
string_type str (size_type __sub=0) const
 
const_reference operator[] (size_type __sub) const
 
const_reference prefix () const
 
const_reference suffix () const
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 

10.4 Formatting

These functions perform formatted substitution of the matched character sequences into their target. The format specifiers and escape sequences accepted by these functions are determined by their flags parameter as documented above.

template<typename _Out_iter >
_Out_iter format (_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, match_flag_type __flags=regex_constants::format_default) const
 
template<typename _Out_iter , typename _St , typename _Sa >
_Out_iter format (_Out_iter __out, const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const
 
template<typename _St , typename _Sa >
basic_string< char_type, _St, _Sa > format (const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const
 
string_type format (const char_type *__fmt, match_flag_type __flags=regex_constants::format_default) const
 

10.5 Allocator

allocator_type get_allocator () const noexcept
 

Detailed Description

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

The results of a match or search operation.

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 1583 of file regex.h.


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