.TH "std::match_results< _Bi_iter, _Alloc >" 3cxx "Sun Feb 7 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::match_results< _Bi_iter, _Alloc > \- The results of a match or search operation\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::vector< sub_match< _Bi_iter >, allocator< sub_match< _Bi_iter > > >\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "template _Out_iter \fBformat\fP (_Out_iter __out, const \fBmatch_results\fP< _Bi_iter, _Alloc >::char_type *__fmt_first, const \fBmatch_results\fP< _Bi_iter, _Alloc >::char_type *__fmt_last, \fBmatch_flag_type\fP __flags) const" .br .in -1c .SS "Private Member Functions" .in +1c .ti -1c .RI "iterator \fBbegin\fP () noexcept" .br .ti -1c .RI "iterator \fBend\fP () noexcept" .br .ti -1c .RI "allocator_type \fBget_allocator\fP () const noexcept" .br .RI "Get a copy of the memory allocation object\&. " .ti -1c .RI "\fBconst_reference\fP \fBoperator[]\fP (size_type __n) const noexcept" .br .RI "Subscript access to the data contained in the vector\&. " .ti -1c .RI "\fBreference\fP \fBoperator[]\fP (size_type __n) noexcept" .br .RI "Subscript access to the data contained in the vector\&. " .ti -1c .RI "void \fBswap\fP (\fBvector\fP &__x) noexcept" .br .RI "Swaps data with another vector\&. " .in -1c .SS "10\&.? Public Types" .in +1c .ti -1c .RI "typedef \fBsub_match\fP< _Bi_iter > \fBvalue_type\fP" .br .ti -1c .RI "typedef const \fBvalue_type\fP & \fBconst_reference\fP" .br .ti -1c .RI "typedef \fBvalue_type\fP & \fBreference\fP" .br .ti -1c .RI "typedef _Base_type::const_iterator \fBconst_iterator\fP" .br .ti -1c .RI "typedef const_iterator \fBiterator\fP" .br .ti -1c .RI "typedef __iter_traits::difference_type \fBdifference_type\fP" .br .ti -1c .RI "typedef \fBallocator_traits\fP< _Alloc >::size_type \fBsize_type\fP" .br .ti -1c .RI "typedef _Alloc \fBallocator_type\fP" .br .ti -1c .RI "typedef __iter_traits::value_type \fBchar_type\fP" .br .ti -1c .RI "typedef \fBstd::basic_string\fP< char_type > \fBstring_type\fP" .br .in -1c .SS "10\&.6 Swap" .in +1c .ti -1c .RI "template class \fB__detail::_Executor\fP" .br .RI "Swaps the contents of two match_results\&. " .ti -1c .RI "template class \fBregex_iterator\fP" .br .RI "Swaps the contents of two match_results\&. " .ti -1c .RI "template bool \fB__detail::__regex_algo_impl\fP (_Bp, _Bp, \fBmatch_results\fP< _Bp, _Ap > &, const \fBbasic_regex\fP< _Cp, _Rp > &, \fBregex_constants::match_flag_type\fP)" .br .RI "Swaps the contents of two match_results\&. " .ti -1c .RI "void \fBswap\fP (\fBmatch_results\fP &__that) noexcept" .br .RI "Swaps the contents of two match_results\&. " .in -1c .SS "28\&.10\&.1 Construction, Copying, and Destruction" .in +1c .ti -1c .RI "\fBmatch_results\fP ()" .br .RI "Constructs a default match_results container\&. " .ti -1c .RI "\fBmatch_results\fP (const _Alloc &__a) noexcept" .br .RI "Constructs a default match_results container\&. " .ti -1c .RI "\fBmatch_results\fP (const \fBmatch_results\fP &)=default" .br .RI "Copy constructs a match_results\&. " .ti -1c .RI "\fBmatch_results\fP (\fBmatch_results\fP &&) noexcept=default" .br .RI "Move constructs a match_results\&. " .ti -1c .RI "\fBmatch_results\fP & \fBoperator=\fP (const \fBmatch_results\fP &)=default" .br .RI "Assigns rhs to *this\&. " .ti -1c .RI "\fBmatch_results\fP & \fBoperator=\fP (\fBmatch_results\fP &&)=default" .br .RI "Move-assigns rhs to *this\&. " .ti -1c .RI "\fB~match_results\fP ()=default" .br .RI "Destroys a match_results object\&. " .ti -1c .RI "bool \fBready\fP () const noexcept" .br .RI "Indicates if the match_results is ready\&. " .in -1c .SS "28\&.10\&.2 Size" .in +1c .ti -1c .RI "size_type \fBsize\fP () const noexcept" .br .RI "Gets the number of matches and submatches\&. " .ti -1c .RI "size_type \fBmax_size\fP () const noexcept" .br .RI "Gets the number of matches and submatches\&. " .ti -1c .RI "_GLIBCXX_NODISCARD bool \fBempty\fP () const noexcept" .br .RI "Indicates if the match_results contains no results\&. " .in -1c .SS "10\&.3 Element Access" .in +1c .ti -1c .RI "difference_type \fBlength\fP (size_type __sub=0) const" .br .RI "Gets the length of the indicated submatch\&. " .ti -1c .RI "difference_type \fBposition\fP (size_type __sub=0) const" .br .RI "Gets the offset of the beginning of the indicated submatch\&. " .ti -1c .RI "\fBstring_type\fP \fBstr\fP (size_type __sub=0) const" .br .RI "Gets the match or submatch converted to a string type\&. " .ti -1c .RI "\fBconst_reference\fP \fBoperator[]\fP (size_type __sub) const" .br .RI "Gets a sub_match reference for the match or submatch\&. " .ti -1c .RI "\fBconst_reference\fP \fBprefix\fP () const" .br .RI "Gets a sub_match representing the match prefix\&. " .ti -1c .RI "\fBconst_reference\fP \fBsuffix\fP () const" .br .RI "Gets a sub_match representing the match suffix\&. " .ti -1c .RI "const_iterator \fBbegin\fP () const noexcept" .br .RI "Gets an iterator to the start of the sub_match collection\&. " .ti -1c .RI "const_iterator \fBcbegin\fP () const noexcept" .br .RI "Gets an iterator to the start of the sub_match collection\&. " .ti -1c .RI "const_iterator \fBend\fP () const noexcept" .br .RI "Gets an iterator to one-past-the-end of the collection\&. " .ti -1c .RI "const_iterator \fBcend\fP () const noexcept" .br .RI "Gets an iterator to one-past-the-end of the collection\&. " .in -1c .SS "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 \fCflags\fP parameter as documented above\&. .in +1c .ti -1c .RI "template _Out_iter \fBformat\fP (_Out_iter __out, const char_type *__fmt_first, const char_type *__fmt_last, \fBmatch_flag_type\fP __flags=\fBregex_constants::format_default\fP) const" .br .ti -1c .RI "template _Out_iter \fBformat\fP (_Out_iter __out, const \fBbasic_string\fP< char_type, _St, _Sa > &__fmt, \fBmatch_flag_type\fP __flags=\fBregex_constants::format_default\fP) const" .br .ti -1c .RI "template \fBbasic_string\fP< char_type, _St, _Sa > \fBformat\fP (const \fBbasic_string\fP< char_type, _St, _Sa > &__fmt, \fBmatch_flag_type\fP __flags=\fBregex_constants::format_default\fP) const" .br .ti -1c .RI "\fBstring_type\fP \fBformat\fP (const char_type *__fmt, \fBmatch_flag_type\fP __flags=\fBregex_constants::format_default\fP) const" .br .in -1c .SS "10\&.5 Allocator" .in +1c .ti -1c .RI "allocator_type \fBget_allocator\fP () const noexcept" .br .RI "Gets a copy of the allocator\&. " .in -1c .SH "Detailed Description" .PP .SS "template >> .br 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\&. .PP This class satisfies the Sequence requirements, with the exception that only the operations defined for a const-qualified Sequence are supported\&. .PP 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\&. .PP Definition at line 1583 of file regex\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.