.TH "std::sub_match< _BiIter >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::sub_match< _BiIter > .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP __iter_traits::difference_type \fBdifference_type\fP" .br .ti -1c .RI "\fBtypedef\fP _BiIter \fBiterator\fP" .br .ti -1c .RI "\fBtypedef\fP \fBbasic_string\fP< value_type > \fBstring_type\fP" .br .ti -1c .RI "\fBtypedef\fP __iter_traits::value_type \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "int \fBcompare\fP (const \fBsub_match\fP &\fB__s\fP) const" .br .RI "Compares this and another matched sequence\&. " .ti -1c .RI "difference_type \fBlength\fP () const noexcept" .br .RI "Gets the length of the matching sequence\&. " .ti -1c .RI "\fBoperator string_type\fP () const" .br .RI "Gets the matching sequence as a string\&. " .ti -1c .RI "\fBstring_type\fP \fBstr\fP () const" .br .RI "Gets the matching sequence as a string\&. " .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBsub_match\fP &\fB__s\fP) noexcept(\fB__is_nothrow_swappable\fP< _BiIter >::value)" .br .RI "Swap the values of two sub_match objects\&. " .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "int \fBcompare\fP (const \fBstring_type\fP &\fB__s\fP) const" .br .RI "Compares this \fCsub_match\fP to a string\&. " .ti -1c .RI "int \fBcompare\fP (const value_type *\fB__s\fP) const" .br .RI "Compares this \fCsub_match\fP to a string\&. " .in -1c .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "iterator \fBfirst\fP" .br .ti -1c .RI "bool \fBmatched\fP" .br .ti -1c .RI "iterator \fBsecond\fP" .br .in -1c .SS "Related Symbols" (Note that these are not member symbols\&.) .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "template<\fBtypename\fP _BiIter > bool \fBoperator==\fP (const \fBsub_match\fP< _BiIter > &\fB__lhs\fP, const \fBsub_match\fP< _BiIter > &\fB__rhs\fP)" .br .RI "Tests the equivalence of two regular expression submatches\&. " .ti -1c .RI "template<\fBtypename\fP _BiIter > bool \fBoperator!=\fP (const \fBsub_match\fP< _BiIter > &\fB__lhs\fP, const \fBsub_match\fP< _BiIter > &\fB__rhs\fP)" .br .RI "Tests the inequivalence of two regular expression submatches\&. " .ti -1c .RI "template<\fBtypename\fP _BiIter > bool \fBoperator<\fP (const \fBsub_match\fP< _BiIter > &\fB__lhs\fP, const \fBsub_match\fP< _BiIter > &\fB__rhs\fP)" .br .RI "Tests the ordering of two regular expression submatches\&. " .ti -1c .RI "template<\fBtypename\fP _BiIter > bool \fBoperator<=\fP (const \fBsub_match\fP< _BiIter > &\fB__lhs\fP, const \fBsub_match\fP< _BiIter > &\fB__rhs\fP)" .br .RI "Tests the ordering of two regular expression submatches\&. " .ti -1c .RI "template<\fBtypename\fP _BiIter > bool \fBoperator>=\fP (const \fBsub_match\fP< _BiIter > &\fB__lhs\fP, const \fBsub_match\fP< _BiIter > &\fB__rhs\fP)" .br .RI "Tests the ordering of two regular expression submatches\&. " .ti -1c .RI "template<\fBtypename\fP _BiIter > bool \fBoperator>\fP (const \fBsub_match\fP< _BiIter > &\fB__lhs\fP, const \fBsub_match\fP< _BiIter > &\fB__rhs\fP)" .br .RI "Tests the ordering of two regular expression submatches\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator==\fP (const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the equivalence of a string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator!=\fP (const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the inequivalence of a string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator<\fP (const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator>\fP (const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator>=\fP (const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator<=\fP (const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator==\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__rhs\fP)" .br .RI "Tests the equivalence of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator!=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__rhs\fP)" .br .RI "Tests the inequivalence of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator<\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator>\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator>=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP \fB_Ch_alloc\fP > bool \fBoperator<=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, const \fB__sub_match_string\fP< _Bi_iter, \fB_Ch_traits\fP, \fB_Ch_alloc\fP > &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator==\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the equivalence of a C string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator!=\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the inequivalence of a C string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a C string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a C string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>=\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a C string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<=\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a C string and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator==\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__rhs\fP)" .br .RI "Tests the equivalence of a regular expression submatch and a C string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator!=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__rhs\fP)" .br .RI "Tests the inequivalence of a regular expression submatch and a string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a C string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a C string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a C string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const *\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a C string\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator==\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the equivalence of a character and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator!=\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the inequivalence of a character and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a character and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a character and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>=\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a character and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<=\fP (\fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__lhs\fP, const \fBsub_match\fP< _Bi_iter > &\fB__rhs\fP)" .br .RI "Tests the ordering of a character and a regular expression submatch\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator==\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__rhs\fP)" .br .RI "Tests the equivalence of a regular expression submatch and a character\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator!=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__rhs\fP)" .br .RI "Tests the inequivalence of a regular expression submatch and a character\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a character\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a character\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator>=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a character\&. " .ti -1c .RI "template<\fBtypename\fP _Bi_iter > bool \fBoperator<=\fP (const \fBsub_match\fP< _Bi_iter > &\fB__lhs\fP, \fBtypename\fP \fBiterator_traits\fP< _Bi_iter >::value_type const &\fB__rhs\fP)" .br .RI "Tests the ordering of a regular expression submatch and a character\&. " .ti -1c .RI "template<\fBtypename\fP \fB_Ch_type\fP , \fBtypename\fP \fB_Ch_traits\fP , \fBtypename\fP _Bi_iter > \fBbasic_ostream\fP< \fB_Ch_type\fP, \fB_Ch_traits\fP > & \fBoperator<<\fP (\fBbasic_ostream\fP< \fB_Ch_type\fP, \fB_Ch_traits\fP > &\fB__os\fP, const \fBsub_match\fP< _Bi_iter > &\fB__m\fP)" .br .RI "Inserts a matched string into an output stream\&. " .in -1c .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _BiIter> .br class std::sub_match< _BiIter >"A sequence of characters matched by a particular marked sub-expression\&. .PP An object of this class is essentially a pair of iterators marking a matched subexpression within a regular expression pattern match\&. Such objects can be converted to and compared with std::basic_string objects of the same character type as the pattern matched by the regular expression\&. .PP A \fCsub_match\fP has a public base class of type \fCpair\fP, so inherits pair's data members named \fCfirst\fP and \fCsecond\fP\&. The iterators that make up the pair are the usual half-open interval referencing the actual original pattern matched\&. .PP \fBSince\fP .RS 4 C++11 .RE .PP .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _BiIter > int \fBstd::sub_match\fP< _BiIter >::compare (const \fBstring_type\fP & __s) const\fC [inline]\fP" .PP Compares this \fCsub_match\fP to a string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A string to compare to this \fCsub_match\fP\&. .RE .PP \fBReturn values\fP .RS 4 \fInegative\fP This matched sequence will collate before \fC__s\fP\&. .br \fIzero\fP This matched sequence is equivalent to \fC__s\fP\&. .br \fIpositive\fP This matched sequence will collate after \fC__s\fP\&. .RE .PP .SS "template<\fBtypename\fP _BiIter > int \fBstd::sub_match\fP< _BiIter >::compare (const \fBsub_match\fP< _BiIter > & __s) const\fC [inline]\fP" .PP Compares this and another matched sequence\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Another matched sequence to compare to this one\&. .RE .PP \fBReturn values\fP .RS 4 \fInegative\fP This matched sequence will collate before \fC__s\fP\&. .br \fIzero\fP This matched sequence is equivalent to \fC__s\fP\&. .br \fIpositive\fP This matched sequence will collate after \fC__s\fP\&. .RE .PP .SS "template<\fBtypename\fP _BiIter > int \fBstd::sub_match\fP< _BiIter >::compare (const value_type * __s) const\fC [inline]\fP" .PP Compares this \fCsub_match\fP to a string\&. .PP \fBParameters\fP .RS 4 \fI__s\fP A string to compare to this \fCsub_match\fP\&. .RE .PP \fBReturn values\fP .RS 4 \fInegative\fP This matched sequence will collate before \fC__s\fP\&. .br \fIzero\fP This matched sequence is equivalent to \fC__s\fP\&. .br \fIpositive\fP This matched sequence will collate after \fC__s\fP\&. .RE .PP .SS "template<\fBtypename\fP _BiIter > difference_type \fBstd::sub_match\fP< _BiIter >::length () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Gets the length of the matching sequence\&. .PP References \fBstd::distance()\fP\&. .SS "template<\fBtypename\fP _BiIter > \fBstd::sub_match\fP< _BiIter >::operator \fBstring_type\fP () const\fC [inline]\fP" .PP Gets the matching sequence as a string\&. .PP \fBReturns\fP .RS 4 the matching sequence as a string\&. .RE .PP This is the implicit conversion operator\&. It is identical to the str() member function except that it will want to pop up in unexpected places and cause a great deal of confusion and cursing from the unwary\&. .PP References \fBstd::sub_match< _BiIter >::str()\fP\&. .SS "template<\fBtypename\fP _BiIter > \fBstring_type\fP \fBstd::sub_match\fP< _BiIter >::str () const\fC [inline]\fP" .PP Gets the matching sequence as a string\&. .PP \fBReturns\fP .RS 4 the matching sequence as a string\&. .RE .PP .PP Referenced by \fBstd::sub_match< _BiIter >::operator string_type()\fP\&. .SS "template<\fBtypename\fP _BiIter > \fBvoid\fP \fBstd::sub_match\fP< _BiIter >::swap (\fBsub_match\fP< _BiIter > & __s)\fC [inline]\fP, \fC [noexcept]\fP" .PP Swap the values of two sub_match objects\&. .PP References \fBstd::swap()\fP, and \fBstd::pair< _T1, _T2 >::swap()\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.