std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >
Contents
Constructor & Destructor Documentation
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::regex_token_iterator()[inline]
Default constructs a regex_token_iterator. A default-constructed regex_token_iterator is a singular
iterator that will compare equal to the one-past-the-end value for any iterator of the same type.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::regex_token_iterator(_Bi_iter__a,_Bi_iter__b,constregex_type&__re,int__submatch=0,regex_constants::match_flag_type__m=regex_constants::match_default)[inline]
Constructs a regex_token_iterator...
Parameters__a [IN] The start of the text to search.
__b [IN] One-past-the-end of the text to search.
__re [IN] The regular expression to search for.
__submatch [IN] Which submatch to return. There are some special values for this parameter:
• -1 each enumerated subexpression does NOT match the regular expression (aka field splitting)
• 0 the entire string matching the subexpression is returned for each match within the text.
• >0 enumerates only the indicated subexpression from a match within the text.
__m [IN] Policy flags for match rules.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::regex_token_iterator(_Bi_iter__a,_Bi_iter__b,constregex_type&__re,conststd::vector<int>&__submatches,regex_constants::match_flag_type__m=regex_constants::match_default)[inline]
Constructs a regex_token_iterator...
Parameters__a [IN] The start of the text to search.
__b [IN] One-past-the-end of the text to search.
__re [IN] The regular expression to search for.
__submatches [IN] A list of subexpressions to return for each regular expression match within the
text.
__m [IN] Policy flags for match rules.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::regex_token_iterator(_Bi_iter__a,_Bi_iter__b,constregex_type&__re,initializer_list<int>__submatches,regex_constants::match_flag_type__m=regex_constants::match_default)[inline]
Constructs a regex_token_iterator...
Parameters__a [IN] The start of the text to search.
__b [IN] One-past-the-end of the text to search.
__re [IN] The regular expression to search for.
__submatches [IN] A list of subexpressions to return for each regular expression match within the
text.
__m [IN] Policy flags for match rules.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>template<std::size_t_Nm>std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::regex_token_iterator(_Bi_iter__a,_Bi_iter__b,constregex_type&__re,constint(&)__submatches[_Nm],regex_constants::match_flag_type__m=regex_constants::match_default)[inline]
Constructs a regex_token_iterator...
Parameters__a [IN] The start of the text to search.
__b [IN] One-past-the-end of the text to search.
__re [IN] The regular expression to search for.
__submatches [IN] A list of subexpressions to return for each regular expression match within the
text.
__m [IN] Policy flags for match rules.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::regex_token_iterator(constregex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>&__rhs)[inline]
Copy constructs a regex_token_iterator.
Parameters__rhs [IN] A regex_token_iterator to copy.
Detailed Description
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>
class std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >"Iterates over submatches in a range (or
splits a text string).
The purpose of this iterator is to enumerate all, or all specified, matches of a regular expression
within a text range. The dereferenced value of an iterator of this class is a std::sub_match object.
Since
C++11
Member Function Documentation
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>constvalue_type&std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::operator*()const[inline]
Dereferences a regex_token_iterator.
template<typename_Bi_iter,typename_Ch_type,typename_Rx_traits>regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>&std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::operator++()
Increments a regex_token_iterator.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>regex_token_iteratorstd::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::operator++(int)[inline]
Postincrements a regex_token_iterator.
template<typename_Bi_iter,typename_Ch_type=typenameiterator_traits<_Bi_iter>::value_type,typename_Rx_traits=regex_traits<_Ch_type>>constvalue_type*std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::operator->()const[inline]
Selects a regex_token_iterator member.
template<typename_Bi_iter,typename_Ch_type,typename_Rx_traits>regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>&std::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::operator=(constregex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>&__rhs)
Assigns a regex_token_iterator to another.
Parameters__rhs [IN] A regex_token_iterator to copy.
template<typename_Bi_iter,typename_Ch_type,typename_Rx_traits>boolstd::regex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>::operator==(constregex_token_iterator<_Bi_iter,_Ch_type,_Rx_traits>&__rhs)const
Compares a regex_token_iterator to another for equality.
Name
std::regex_token_iterator< _Bi_iter, _Ch_type, _Rx_traits >
Synopsis
#include <regex>
PublicTypestypedef std::ptrdiff_t difference_typetypedefstd::forward_iterator_tagiterator_categorytypedef const value_type * pointertypedef const value_type & referencetypedefbasic_regex< _Ch_type, _Rx_traits > regex_typetypedefsub_match< _Bi_iter > value_typePublicMemberFunctionsregex_token_iterator ()
Default constructs a regex_token_iterator.
template<std::size_t _Nm> regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, const
int(&__submatches)[_Nm], regex_constants::match_flag_type__m=regex_constants::match_default)
regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, const std::vector< int >
&__submatches, regex_constants::match_flag_type__m=regex_constants::match_default)
regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, initializer_list< int >
__submatches, regex_constants::match_flag_type__m=regex_constants::match_default)
regex_token_iterator (_Bi_iter __a, _Bi_iter __b, const regex_type &__re, int __submatch=0,
regex_constants::match_flag_type__m=regex_constants::match_default)
template<std::size_t _Nm> regex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, const
int(&)[_Nm], regex_constants::match_flag_type=regex_constants::match_default)=deleteregex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, const std::vector< int > &,
regex_constants::match_flag_type=regex_constants::match_default)=deleteregex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, initializer_list< int >,
regex_constants::match_flag_type=regex_constants::match_default)=deleteregex_token_iterator (_Bi_iter, _Bi_iter, const regex_type &&, int=0,
regex_constants::match_flag_type=regex_constants::match_default)=deleteregex_token_iterator (const regex_token_iterator &__rhs)
Copy constructs a regex_token_iterator.
const value_type & operator* () const
Dereferences a regex_token_iterator.
regex_token_iterator & operator++ ()
Increments a regex_token_iterator.
regex_token_iteratoroperator++ (int)
Postincrements a regex_token_iterator.
const value_type * operator-> () const
Selects a regex_token_iterator member.
regex_token_iterator & operator= (const regex_token_iterator &__rhs)
Assigns a regex_token_iterator to another.
bool operator== (const regex_token_iterator &__rhs) const
Compares a regex_token_iterator to another for equality.
bool operator== (default_sentinel_t) const noexcept
