31 namespace std _GLIBCXX_VISIBILITY(default)
 
   35 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   37   enum class _RegexExecutorPolicy : int
 
   38     { _S_auto, _S_alternate };
 
   40   template<
typename _BiIter, 
typename _Alloc,
 
   41        typename _CharT, 
typename _TraitsT,
 
   42        _RegexExecutorPolicy __policy,
 
   45     __regex_algo_impl(_BiIter                              __s,
 
   47               match_results<_BiIter, _Alloc>&      __m,
 
   48               const basic_regex<_CharT, _TraitsT>& __re,
 
   51 _GLIBCXX_END_NAMESPACE_VERSION
 
   54 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   71   template<
typename _Ch_type>
 
   75       typedef _Ch_type                      char_type;
 
   81       typedef typename std::ctype<char_type>::mask _BaseType;
 
   83       unsigned char _M_extended;
 
   84       static constexpr 
unsigned char _S_under = 1 << 0;
 
   87       static constexpr 
unsigned char _S_blank = 1 << 1;
 
   88       static constexpr 
unsigned char _S_valid_mask = 0x3;
 
   90       constexpr _RegexMask(_BaseType 
__base = 0,
 
   91                    unsigned char __extended = 0)
 
   92       : _M_base(
__base), _M_extended(__extended)
 
   98         return _RegexMask(_M_base & __other._M_base,
 
   99                   _M_extended & __other._M_extended);
 
  105         return _RegexMask(_M_base | __other._M_base,
 
  106                   _M_extended | __other._M_extended);
 
  112         return _RegexMask(_M_base ^ __other._M_base,
 
  113                   _M_extended ^ __other._M_extended);
 
  118       { 
return _RegexMask(~_M_base, ~_M_extended); }
 
  121       operator&=(_RegexMask __other)
 
  122       { 
return *
this = (*this) & __other; }
 
  125       operator|=(_RegexMask __other)
 
  126       { 
return *
this = (*this) | __other; }
 
  129       operator^=(_RegexMask __other)
 
  130       { 
return *
this = (*this) ^ __other; }
 
  133       operator==(_RegexMask __other)
 const 
  135         return (_M_extended & _S_valid_mask)
 
  136            == (__other._M_extended & _S_valid_mask)
 
  137              && _M_base == __other._M_base;
 
  141       operator!=(_RegexMask __other)
 const 
  142       { 
return !((*this) == __other); }
 
  146       typedef _RegexMask char_class_type;
 
  166       { 
return string_type::traits_type::length(__p); }
 
  192     const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
 
  193     return __fctyp.tolower(__c);
 
  216       template<
typename _Fwd_iter>
 
  221       const __collate_type& __fclt(use_facet<__collate_type>(_M_locale));
 
  223       return __fclt.transform(__s.
data(), __s.
data() + __s.
size());
 
  240       template<
typename _Fwd_iter>
 
  251       const __ctype_type& __fctyp(use_facet<__ctype_type>(_M_locale));
 
  268       template<
typename _Fwd_iter>
 
  309       template<
typename _Fwd_iter>
 
  312              bool __icase = 
false) 
const;
 
  327       isctype(_Ch_type __c, char_class_type __f) 
const;
 
  340       value(_Ch_type __ch, 
int __radix) 
const;
 
  366       { 
return _M_locale; }
 
  369       locale_type _M_locale;
 
  380   template<
typename _Ch_type, 
typename _Rx_traits = regex_traits<_Ch_type>>
 
  384       static_assert(is_same<_Ch_type, typename _Rx_traits::char_type>::value,
 
  385             "regex traits class must have the same char_type");
 
  388       typedef _Ch_type                            value_type;
 
  389       typedef _Rx_traits                          traits_type;
 
  390       typedef typename traits_type::string_type   string_type;
 
  392       typedef typename traits_type::locale_type   locale_type;
 
  417       : _M_flags(ECMAScript), _M_automaton(nullptr)
 
  433       : 
basic_regex(__p, __p + _Rx_traits::length(__p), __f)
 
  466       : _M_flags(__rhs._M_flags), _M_traits(__rhs._M_traits),
 
  467     _M_automaton(std::move(__rhs._M_automaton))
 
  479       template<
typename _Ch_traits, 
typename _Ch_alloc>
 
  500       template<
typename _FwdIter>
 
  504       _M_automaton(__detail::__compile_nfa(__first, __last, _M_traits,
 
  531       { 
return this->
assign(__rhs); }
 
  538       { 
return this->
assign(std::move(__rhs)); }
 
  557       template<
typename _Ch_typeraits, 
typename _Alloc>
 
  604       { 
return this->
assign(string_type(__p), __flags); }
 
  621       { 
return this->
assign(string_type(__p, __len), __flags); }
 
  634       template<
typename _Ch_typeraits, 
typename _Alloc>
 
  640       _M_automaton = __detail::__compile_nfa(__s.
begin(), __s.
end(),
 
  641                          _M_traits, _M_flags);
 
  658       template<
typename _InputIterator>
 
  660     assign(_InputIterator __first, _InputIterator __last,
 
  662     { 
return this->
assign(string_type(__first, __last), __flags); }
 
  677       { 
return this->
assign(__l.begin(), __l.end(), __flags); }
 
  686       { 
return _M_automaton->_M_sub_count() - 1; }
 
  704       { 
return _M_traits.imbue(__loc); }
 
  712       { 
return _M_traits.getloc(); }
 
  725     std::swap(_M_automaton, __rhs._M_automaton);
 
  728 #ifdef _GLIBCXX_DEBUG 
  731       { _M_automaton->_M_dot(__ostr); }
 
  737       template<
typename _Bp, 
typename _Ap, 
typename _Cp, 
typename _Rp,
 
  738     __detail::_RegexExecutorPolicy, 
bool>
 
  740     __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
 
  741                     const basic_regex<_Cp, _Rp>&,
 
  744       template<
typename, 
typename, 
typename, 
bool>
 
  745     friend class __detail::_Executor;
 
  748       _Rx_traits    _M_traits;
 
  749       _AutomatonPtr _M_automaton;
 
  755 #ifdef _GLIBCXX_USE_WCHAR_T 
  767   template<
typename _Ch_type, 
typename _Rx_traits>
 
  771     { __lhs.
swap(__rhs); }
 
  787   template<
typename _BiIter>
 
  790       typedef iterator_traits<_BiIter>          __iter_traits;
 
  793       typedef typename __iter_traits::value_type        value_type;
 
  794       typedef typename __iter_traits::difference_type   difference_type;
 
  795       typedef _BiIter                                   iterator;
 
  886 #ifdef _GLIBCXX_USE_WCHAR_T 
  902   template<
typename _BiIter>
 
  905     { 
return __lhs.
compare(__rhs) == 0; }
 
  913   template<
typename _BiIter>
 
  916     { 
return __lhs.
compare(__rhs) != 0; }
 
  924   template<
typename _BiIter>
 
  927     { 
return __lhs.
compare(__rhs) < 0; }
 
  935   template<
typename _BiIter>
 
  938     { 
return __lhs.
compare(__rhs) <= 0; }
 
  946   template<
typename _BiIter>
 
  949     { 
return __lhs.
compare(__rhs) >= 0; }
 
  957   template<
typename _BiIter>
 
  960     { 
return __lhs.
compare(__rhs) > 0; }
 
  963   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
  964     using __sub_match_string = basic_string<
 
  965                   typename iterator_traits<_Bi_iter>::value_type,
 
  966                   _Ch_traits, _Ch_alloc>;
 
  975   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
  988   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
  992     { 
return !(__lhs == __rhs); }
 
 1000   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
 1002     operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
 
 1004      { 
return __rhs.
compare(__lhs.c_str()) > 0; }
 
 1012   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
 1016     { 
return __rhs < __lhs; }
 
 1024   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
 1028     { 
return !(__lhs < __rhs); }
 
 1036   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
 1038     operator<=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
 
 1040     { 
return !(__rhs < __lhs); }
 
 1049   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
 1062   template<
typename _Bi_iter, 
typename _Ch_traits, 
typename _Ch_alloc>
 
 1066     { 
return !(__lhs == __rhs); }
 
 1074   template<
typename _Bi_iter, 
class _Ch_traits, 
class _Ch_alloc>
 
 1076     operator<(const sub_match<_Bi_iter>& __lhs,
 
 1078     { 
return __lhs.
compare(__rhs.c_str()) < 0; }
 
 1086   template<
typename _Bi_iter, 
class _Ch_traits, 
class _Ch_alloc>
 
 1090     { 
return __rhs < __lhs; }
 
 1098   template<
typename _Bi_iter, 
class _Ch_traits, 
class _Ch_alloc>
 
 1102     { 
return !(__lhs < __rhs); }
 
 1110   template<
typename _Bi_iter, 
class _Ch_traits, 
class _Ch_alloc>
 
 1112     operator<=(const sub_match<_Bi_iter>& __lhs,
 
 1114     { 
return !(__rhs < __lhs); }
 
 1123   template<
typename _Bi_iter>
 
 1125     operator==(
typename iterator_traits<_Bi_iter>::value_type 
const* __lhs,
 
 1127     { 
return __rhs.
compare(__lhs) == 0; }
 
 1136   template<
typename _Bi_iter>
 
 1138     operator!=(
typename iterator_traits<_Bi_iter>::value_type 
const* __lhs,
 
 1140     { 
return !(__lhs == __rhs); }
 
 1148   template<
typename _Bi_iter>
 
 1150     operator<(typename iterator_traits<_Bi_iter>::value_type 
const* __lhs,
 
 1152     { 
return __rhs.
compare(__lhs) > 0; }
 
 1160   template<
typename _Bi_iter>
 
 1162     operator>(
typename iterator_traits<_Bi_iter>::value_type 
const* __lhs,
 
 1164     { 
return __rhs < __lhs; }
 
 1172   template<
typename _Bi_iter>
 
 1174     operator>=(
typename iterator_traits<_Bi_iter>::value_type 
const* __lhs,
 
 1176     { 
return !(__lhs < __rhs); }
 
 1184   template<
typename _Bi_iter>
 
 1186     operator<=(typename iterator_traits<_Bi_iter>::value_type 
const* __lhs,
 
 1188     { 
return !(__rhs < __lhs); }
 
 1197   template<
typename _Bi_iter>
 
 1200            typename iterator_traits<_Bi_iter>::value_type 
const* __rhs)
 
 1201     { 
return __lhs.
compare(__rhs) == 0; }
 
 1210   template<
typename _Bi_iter>
 
 1213            typename iterator_traits<_Bi_iter>::value_type 
const* __rhs)
 
 1214     { 
return !(__lhs == __rhs); }
 
 1222   template<
typename _Bi_iter>
 
 1224     operator<(const sub_match<_Bi_iter>& __lhs,
 
 1225           typename iterator_traits<_Bi_iter>::value_type 
const* __rhs)
 
 1226     { 
return __lhs.compare(__rhs) < 0; }
 
 1234   template<
typename _Bi_iter>
 
 1237           typename iterator_traits<_Bi_iter>::value_type 
const* __rhs)
 
 1238     { 
return __rhs < __lhs; }
 
 1246   template<
typename _Bi_iter>
 
 1249            typename iterator_traits<_Bi_iter>::value_type 
const* __rhs)
 
 1250     { 
return !(__lhs < __rhs); }
 
 1258   template<
typename _Bi_iter>
 
 1260     operator<=(const sub_match<_Bi_iter>& __lhs,
 
 1261            typename iterator_traits<_Bi_iter>::value_type 
const* __rhs)
 
 1262     { 
return !(__rhs < __lhs); }
 
 1271   template<
typename _Bi_iter>
 
 1273     operator==(
typename iterator_traits<_Bi_iter>::value_type 
const& __lhs,
 
 1277       return __rhs.
compare(string_type(1, __lhs)) == 0;
 
 1287   template<
typename _Bi_iter>
 
 1289     operator!=(
typename iterator_traits<_Bi_iter>::value_type 
const& __lhs,
 
 1291     { 
return !(__lhs == __rhs); }
 
 1299   template<
typename _Bi_iter>
 
 1301     operator<(typename iterator_traits<_Bi_iter>::value_type 
const& __lhs,
 
 1305       return __rhs.
compare(string_type(1, __lhs)) > 0;
 
 1314   template<
typename _Bi_iter>
 
 1316     operator>(
typename iterator_traits<_Bi_iter>::value_type 
const& __lhs,
 
 1318     { 
return __rhs < __lhs; }
 
 1326   template<
typename _Bi_iter>
 
 1328     operator>=(
typename iterator_traits<_Bi_iter>::value_type 
const& __lhs,
 
 1330     { 
return !(__lhs < __rhs); }
 
 1338   template<
typename _Bi_iter>
 
 1340     operator<=(typename iterator_traits<_Bi_iter>::value_type 
const& __lhs,
 
 1342     { 
return !(__rhs < __lhs); }
 
 1351   template<
typename _Bi_iter>
 
 1354            typename iterator_traits<_Bi_iter>::value_type 
const& __rhs)
 
 1357       return __lhs.
compare(string_type(1, __rhs)) == 0;
 
 1367   template<
typename _Bi_iter>
 
 1370            typename iterator_traits<_Bi_iter>::value_type 
const& __rhs)
 
 1371     { 
return !(__lhs == __rhs); }
 
 1379   template<
typename _Bi_iter>
 
 1381     operator<(const sub_match<_Bi_iter>& __lhs,
 
 1382           typename iterator_traits<_Bi_iter>::value_type 
const& __rhs)
 
 1385       return __lhs.
compare(string_type(1, __rhs)) < 0;
 
 1394   template<
typename _Bi_iter>
 
 1397           typename iterator_traits<_Bi_iter>::value_type 
const& __rhs)
 
 1398     { 
return __rhs < __lhs; }
 
 1406   template<
typename _Bi_iter>
 
 1409            typename iterator_traits<_Bi_iter>::value_type 
const& __rhs)
 
 1410     { 
return !(__lhs < __rhs); }
 
 1418   template<
typename _Bi_iter>
 
 1420     operator<=(const sub_match<_Bi_iter>& __lhs,
 
 1421            typename iterator_traits<_Bi_iter>::value_type 
const& __rhs)
 
 1422     { 
return !(__rhs < __lhs); }
 
 1432   template<
typename _Ch_type, 
typename _Ch_traits, 
typename _Bi_iter>
 
 1434     basic_ostream<_Ch_type, _Ch_traits>&
 
 1435     operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
 
 1437     { 
return __os << __m.
str(); }
 
 1444   template<
typename _Bi_iter>
 
 1445     inline const sub_match<_Bi_iter>&
 
 1448       static const sub_match<_Bi_iter> __unmatched = sub_match<_Bi_iter>();
 
 1474   template<
typename _Bi_iter,
 
 1475        typename _Alloc = allocator<sub_match<_Bi_iter> > >
 
 1477     : 
private std::vector<sub_match<_Bi_iter>, _Alloc>
 
 1492       typedef std::iterator_traits<_Bi_iter>           __iter_traits;
 
 1503       typedef typename _Base_type::const_iterator          const_iterator;
 
 1504       typedef const_iterator                               iterator;
 
 1505       typedef typename __iter_traits::difference_type      difference_type;
 
 1507       typedef _Alloc                                       allocator_type;
 
 1508       typedef typename __iter_traits::value_type       char_type;
 
 1538       : 
_Base_type(std::move(__rhs)), _M_in_iterator(false)
 
 1595         return (__size && _Base_type::operator[](0).matched) ? __size - 2 : 0;
 
 1609       { 
return size() == 0; }
 
 1628       { 
return (*
this)[__sub].length(); }
 
 1649                         (*
this)[__sub].first) : -1;
 
 1652                         (*
this)[__sub].first) : -1;
 
 1665       str(size_type __sub = 0)
 const 
 1666       { 
return (*
this)[__sub].str(); }
 
 1682         _GLIBCXX_DEBUG_ASSERT( 
ready() );
 
 1683         return __sub < 
size()
 
 1685            : __unmatched_sub<_Bi_iter>();
 
 1699         _GLIBCXX_DEBUG_ASSERT( 
ready() );
 
 1702            : __unmatched_sub<_Bi_iter>();
 
 1716     _GLIBCXX_DEBUG_ASSERT( 
ready() );
 
 1719            : __unmatched_sub<_Bi_iter>();
 
 1765       template<
typename _Out_iter>
 
 1767     format(_Out_iter __out, 
const char_type* __fmt_first,
 
 1768            const char_type* __fmt_last,
 
 1774       template<
typename _Out_iter, 
typename _St, 
typename _Sa>
 
 1786       template<
typename _Out_iter, 
typename _St, 
typename _Sa>
 
 1823       { 
return _Base_type::get_allocator(); }
 
 1841       template<
typename, 
typename, 
typename, 
bool>
 
 1842     friend class __detail::_Executor;
 
 1844       template<
typename, 
typename, 
typename>
 
 1847       template<
typename _Bp, 
typename _Ap, 
typename _Cp, 
typename _Rp,
 
 1848     __detail::_RegexExecutorPolicy, 
bool>
 
 1855       bool     _M_in_iterator;
 
 1858   typedef match_results<const char*>             cmatch;
 
 1859   typedef match_results<string::const_iterator>  smatch;
 
 1860 #ifdef _GLIBCXX_USE_WCHAR_T 
 1861   typedef match_results<const wchar_t*>          wcmatch;
 
 1862   typedef match_results<wstring::const_iterator> wsmatch;
 
 1871   template<
typename _Bi_iter, 
typename _Alloc>
 
 1895   template<
typename _Bi_iter, 
class _Alloc>
 
 1899     { 
return !(__m1 == __m2); }
 
 1909   template<
typename _Bi_iter, 
typename _Alloc>
 
 1913     { __lhs.
swap(__rhs); }
 
 1936   template<
typename _Bi_iter, 
typename _Alloc,
 
 1937        typename _Ch_type, 
typename _Rx_traits>
 
 1946       return __detail::__regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
 
 1947     __detail::_RegexExecutorPolicy::_S_auto, 
true>
 
 1948       (__s, __e, __m, __re, __flags);
 
 1965   template<
typename _Bi_iter, 
typename _Ch_type, 
typename _Rx_traits>
 
 1973       return regex_match(__first, __last, __what, __re, __flags);
 
 1990   template<
typename _Ch_type, 
typename _Alloc, 
typename _Rx_traits>
 
 1997     { 
return regex_match(__s, __s + _Rx_traits::length(__s), __m, __re, __f); }
 
 2013   template<
typename _Ch_traits, 
typename _Ch_alloc,
 
 2014        typename _Alloc, 
typename _Ch_type, 
typename _Rx_traits>
 
 2018         _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>& __m,
 
 2037   template<
typename _Ch_type, 
class _Rx_traits>
 
 2043     { 
return regex_match(__s, __s + _Rx_traits::length(__s), __re, __f); }
 
 2058   template<
typename _Ch_traits, 
typename _Str_allocator,
 
 2059        typename _Ch_type, 
typename _Rx_traits>
 
 2081   template<
typename _Bi_iter, 
typename _Alloc,
 
 2082        typename _Ch_type, 
typename _Rx_traits>
 
 2090       return __detail::__regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
 
 2091     __detail::_RegexExecutorPolicy::_S_auto, 
false>
 
 2092       (__s, __e, __m, __re, __flags);
 
 2106   template<
typename _Bi_iter, 
typename _Ch_type, 
typename _Rx_traits>
 
 2114       return regex_search(__first, __last, __what, __re, __flags);
 
 2129   template<
typename _Ch_type, 
class _Alloc, 
class _Rx_traits>
 
 2136     { 
return regex_search(__s, __s + _Rx_traits::length(__s), __m, __e, __f); }
 
 2148   template<
typename _Ch_type, 
typename _Rx_traits>
 
 2154     { 
return regex_search(__s, __s + _Rx_traits::length(__s), __e, __f); }
 
 2166   template<
typename _Ch_traits, 
typename _String_allocator,
 
 2167        typename _Ch_type, 
typename _Rx_traits>
 
 2170          _String_allocator>& __s,
 
 2174     { 
return regex_search(__s.begin(), __s.end(), __e, __flags); }
 
 2188   template<
typename _Ch_traits, 
typename _Ch_alloc,
 
 2189        typename _Alloc, 
typename _Ch_type,
 
 2190        typename _Rx_traits>
 
 2194          _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>& __m,
 
 2214   template<
typename _Out_iter, 
typename _Bi_iter,
 
 2215        typename _Rx_traits, 
typename _Ch_type,
 
 2216        typename _St, 
typename _Sa>
 
 2240   template<
typename _Out_iter, 
typename _Bi_iter,
 
 2241        typename _Rx_traits, 
typename _Ch_type>
 
 2243     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
 
 2244           const basic_regex<_Ch_type, _Rx_traits>& __e,
 
 2245           const _Ch_type* __fmt,
 
 2260   template<
typename _Rx_traits, 
typename _Ch_type,
 
 2261        typename _St, 
typename _Sa, 
typename _Fst, 
typename _Fsa>
 
 2262     inline basic_string<_Ch_type, _St, _Sa>
 
 2271             __s.
begin(), __s.
end(), __e, __fmt, __flags);
 
 2286   template<
typename _Rx_traits, 
typename _Ch_type,
 
 2287        typename _St, 
typename _Sa>
 
 2288     inline basic_string<_Ch_type, _St, _Sa>
 
 2291           const _Ch_type* __fmt,
 
 2297             __s.
begin(), __s.
end(), __e, __fmt, __flags);
 
 2312   template<
typename _Rx_traits, 
typename _Ch_type,
 
 2313        typename _St, 
typename _Sa>
 
 2314     inline basic_string<_Ch_type>
 
 2324             __e, __fmt, __flags);
 
 2339   template<
typename _Rx_traits, 
typename _Ch_type>
 
 2340     inline basic_string<_Ch_type>
 
 2343           const _Ch_type* __fmt,
 
 2350             __e, __fmt, __flags);
 
 2361   template<
typename _Bi_iter,
 
 2362        typename _Ch_type = 
typename iterator_traits<_Bi_iter>::value_type,
 
 2363        typename _Rx_traits = regex_traits<_Ch_type> >
 
 2369       typedef std::ptrdiff_t                     difference_type;
 
 2392       : _M_begin(__a), _M_end(__b), _M_pregex(&__re), _M_flags(__m), _M_match()
 
 2394     if (!
regex_search(_M_begin, _M_end, _M_match, *_M_pregex, _M_flags))
 
 2420       { 
return !(*
this == __rhs); }
 
 2427       { 
return _M_match; }
 
 2434       { 
return &_M_match; }
 
 2456       const regex_type*                _M_pregex;
 
 2461   typedef regex_iterator<const char*>             cregex_iterator;
 
 2462   typedef regex_iterator<string::const_iterator>  sregex_iterator;
 
 2463 #ifdef _GLIBCXX_USE_WCHAR_T 
 2464   typedef regex_iterator<const wchar_t*>          wcregex_iterator;
 
 2465   typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
 
 2476   template<
typename _Bi_iter,
 
 2477        typename _Ch_type = 
typename iterator_traits<_Bi_iter>::value_type,
 
 2478        typename _Rx_traits = regex_traits<_Ch_type> >
 
 2484       typedef std::ptrdiff_t                    difference_type;
 
 2498       : _M_position(), _M_subs(), _M_suffix(), _M_n(0), _M_result(nullptr),
 
 2523       : _M_position(__a, __b, __re, __m), _M_subs(1, __submatch), _M_n(0)
 
 2524       { _M_init(__a, __b); }
 
 2540       : _M_position(__a, __b, __re, __m), _M_subs(__submatches), _M_n(0)
 
 2541       { _M_init(__a, __b); }
 
 2557       : _M_position(__a, __b, __re, __m), _M_subs(__submatches), _M_n(0)
 
 2558       { _M_init(__a, __b); }
 
 2569       template<std::
size_t _Nm>
 
 2572                  const int (&__submatches)[_Nm],
 
 2575       : _M_position(__a, __b, __re, __m),
 
 2576       _M_subs(__submatches, *(&__submatches+1)), _M_n(0)
 
 2577       { _M_init(__a, __b); }
 
 2584       : _M_position(__rhs._M_position), _M_subs(__rhs._M_subs),
 
 2585       _M_suffix(__rhs._M_suffix), _M_n(__rhs._M_n), _M_result(__rhs._M_result),
 
 2586       _M_has_m1(__rhs._M_has_m1)
 
 2588     if (__rhs._M_result == &__rhs._M_suffix)
 
 2589       _M_result = &_M_suffix;
 
 2610       { 
return !(*
this == __rhs); }
 
 2617       { 
return *_M_result; }
 
 2624       { 
return _M_result; }
 
 2647       _M_init(_Bi_iter __a, _Bi_iter __b);
 
 2650       _M_current_match()
 const 
 2652     if (_M_subs[_M_n] == -1)
 
 2653       return (*_M_position).prefix();
 
 2655       return (*_M_position)[_M_subs[_M_n]];
 
 2660       { 
return _M_result == 
nullptr; }
 
 2662       _Position         _M_position;
 
 2664       value_type        _M_suffix;
 
 2666       const value_type* _M_result;
 
 2678 #ifdef _GLIBCXX_USE_WCHAR_T 
 2687 _GLIBCXX_END_NAMESPACE_VERSION
 
const _CharT * data() const noexcept
Return const pointer to contents. 
 
basic_regex & operator=(const basic_string< _Ch_type, _Ch_typeraits, _Alloc > &__s)
Replaces a regular expression with a new one constructed from a string. 
 
_Out_iter regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const basic_regex< _Ch_type, _Rx_traits > &__e, const basic_string< _Ch_type, _St, _Sa > &__fmt, regex_constants::match_flag_type __flags=regex_constants::match_default)
Search for a regular expression within a range for multiple times, and replace the matched parts thro...
 
regex_token_iterator< wstring::const_iterator > wsregex_token_iterator
Token iterator for standard wide-character strings. 
 
size_type max_size() const 
Gets the number of matches and submatches. 
 
regex_token_iterator< string::const_iterator > sregex_token_iterator
Token iterator for standard strings. 
 
bitset< _Nb > operator~() const noexcept
See the no-argument flip(). 
 
bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets. 
 
static std::size_t length(const char_type *__p)
Gives the length of a C-style string starting at __p. 
 
string_type transform_primary(_Fwd_iter __first, _Fwd_iter __last) const 
Gets a sort key for a character sequence, independent of case. 
 
_BiIter second
first is a copy of the first object 
 
difference_type length() const 
 
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents. 
 
regex_token_iterator & operator=(const regex_token_iterator &__rhs)
Assigns a regex_token_iterator to another. 
 
Forward iterators support a superset of input iterator operations. 
 
sub_match< const char * > csub_match
Standard regex submatch over a C-style null-terminated string. 
 
locale_type getloc() const 
Gets the locale currently imbued in the regular expression object. 
 
regex_traits()
Constructs a default traits object. 
 
~match_results()
Destroys a match_results object. 
 
match_flag_type
This is a bitmask type indicating regex matching rules. 
 
bool regex_match(_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
Determines if there is a match between the regular expression e and all of the character sequence [fi...
 
bool regex_search(_Bi_iter __s, _Bi_iter __e, match_results< _Bi_iter, _Alloc > &__m, const basic_regex< _Ch_type, _Rx_traits > &__re, regex_constants::match_flag_type __flags=regex_constants::match_default)
 
int compare(const value_type *__s) const 
Compares this sub_match to a C-style string. 
 
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list. 
 
match_results & operator=(const match_results &__rhs)
Assigns rhs to *this. 
 
The results of a match or search operation. 
 
basic_regex & assign(const _Ch_type *__p, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object from a C-style null-terminated string containing a...
 
locale_type imbue(locale_type __loc)
Imbues the regular expression object with the given locale. 
 
_BiIter first
second_type is the second bound type 
 
string_type str(size_type __sub=0) const 
Gets the match or submatch converted to a string type. 
 
int compare(const sub_match &__s) const 
Compares this and another matched sequence. 
 
basic_regex & assign(_InputIterator __first, _InputIterator __last, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object. 
 
Struct holding two objects of arbitrary type. 
 
regex_token_iterator & operator++()
Increments a regex_token_iterator. 
 
void swap(basic_regex &__rhs)
Swaps the contents of two regular expression objects. 
 
basic_regex & assign(basic_regex &&__rhs) noexcept
The move-assignment operator. 
 
basic_string< char_type, _St, _Sa > format(const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const 
 
sub_match< string::const_iterator > ssub_match
Standard regex submatch over a standard string. 
 
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination. 
 
void swap(match_results &__that)
Swaps the contents of two match_results. 
 
basic_regex & assign(const basic_regex &__rhs)
the real assignment operator. 
 
size_type max_size() const noexcept
 
char_type translate(char_type __c) const 
Performs the identity translation. 
 
char_type translate_nocase(char_type __c) const 
Translates a character into a case-insensitive equivalent. 
 
bool isctype(_Ch_type __c, char_class_type __f) const 
Determines if c is a member of an identified class. 
 
match_results(const match_results &__rhs)
Copy constructs a match_results. 
 
reference operator[](size_type __n) noexcept
Subscript access to the data contained in the vector. 
 
bool operator==(const regex_token_iterator &__rhs) const 
Compares a regex_token_iterator to another for equality. 
 
bool operator!=(const regex_token_iterator &__rhs) const 
Compares a regex_token_iterator to another for inequality. 
 
regex_iterator & operator=(const regex_iterator &__rhs)=default
Assigns one regex_iterator to another. 
 
size_type size() const noexcept
 
iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic. 
 
difference_type length(size_type __sub=0) const 
Gets the length of the indicated submatch. 
 
basic_regex(_FwdIter __first, _FwdIter __last, flag_type __f=ECMAScript)
Constructs a basic regular expression from the range [first, last) interpreted according to the flags...
 
regex_token_iterator operator++(int)
Postincrements a regex_token_iterator. 
 
difference_type position(size_type __sub=0) const 
Gets the offset of the beginning of the indicated submatch. 
 
locale_type imbue(locale_type __loc)
Imbues the regex_traits object with a copy of a new locale. 
 
basic_regex & assign(initializer_list< _Ch_type > __l, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object. 
 
basic_regex(const basic_regex &&__rhs) noexcept
Move-constructs a basic regular expression. 
 
const_iterator cbegin() const noexcept
 
basic_regex & operator=(basic_regex &&__rhs) noexcept
Move-assigns one regular expression to another. 
 
const value_type * operator->() const 
Selects a regex_iterator member. 
 
bool empty() const 
Indicates if the match_results contains no results. 
 
Facet for localized string comparison. 
 
match_results & operator=(match_results &&__rhs)
Move-assigns rhs to *this. 
 
char_class_type lookup_classname(_Fwd_iter __first, _Fwd_iter __last, bool __icase=false) const 
Maps one or more characters to a named character classification. 
 
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, const int(&__submatches)[_Nm], regex_constants::match_flag_type __m=regex_constants::match_default)
 
~basic_regex()
Destroys a basic regular expression. 
 
basic_regex & assign(const _Ch_type *__p, std::size_t __len, flag_type __flags)
Assigns a new regular expression to a regex object from a C-style string containing a regular express...
 
basic_regex & operator=(const _Ch_type *__p)
Replaces a regular expression with a new one constructed from a C-style null-terminated string...
 
basic_regex(const _Ch_type *__p, std::size_t __len, flag_type __f=ECMAScript)
Constructs a basic regular expression from the sequence [p, p + len) interpreted according to the fla...
 
allocator_type get_allocator() const 
Gets a copy of the allocator. 
 
iterator begin() noexcept
 
bool equal(_II1 __first1, _II1 __last1, _II2 __first2)
Tests a range for element-wise equality. 
 
int compare(const string_type &__s) const 
Compares this sub_match to a string. 
 
basic_regex< char > regex
Standard regular expressions. 
 
const value_type & operator*() const 
Dereferences a regex_iterator. 
 
Container class for localization functionality.The locale class is first a class wrapper for C librar...
 
regex_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(_Bi_iter __a, _Bi_iter __b, const regex_type &__re, int __submatch=0, regex_constants::match_flag_type __m=regex_constants::match_default)
 
regex_token_iterator()
Default constructs a regex_token_iterator. 
 
const value_type * operator->() const 
Selects a regex_token_iterator member. 
 
const_reference suffix() const 
Gets a sub_match representing the match suffix. 
 
regex_token_iterator< const char * > cregex_token_iterator
Token iterator for C-style NULL-terminated strings. 
 
_Out_iter format(_Out_iter __out, const basic_string< char_type, _St, _Sa > &__fmt, match_flag_type __flags=regex_constants::format_default) const 
 
basic_regex(const _Ch_type *__p, flag_type __f=ECMAScript)
Constructs a basic regular expression from the sequence [__p, __p + char_traits<_Ch_type>::length(__p...
 
const_reference operator[](size_type __sub) const 
Gets a sub_match reference for the match or submatch. 
 
basic_regex & assign(const basic_string< _Ch_type, _Ch_typeraits, _Alloc > &__s, flag_type __flags=ECMAScript)
Assigns a new regular expression to a regex object from a string containing a regular expression patt...
 
basic_regex(initializer_list< _Ch_type > __l, flag_type __f=ECMAScript)
Constructs a basic regular expression from an initializer list. 
 
string_type transform(_Fwd_iter __first, _Fwd_iter __last) const 
Gets a sort key for a character sequence. 
 
Class regex_traits. Describes aspects of a regular expression. 
 
const_iterator cbegin() const 
Gets an iterator to the start of the sub_match collection. 
 
sub_match< wstring::const_iterator > wssub_match
Regex submatch over a standard wide string. 
 
syntax_option_type
This is a bitmask type indicating how to interpret the regex. 
 
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)
 
bool ready() const 
Indicates if the match_results is ready. 
 
string_type lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const 
Gets a collation element by name. 
 
const_iterator end() const 
Gets an iterator to one-past-the-end of the collection. 
 
size_type size() const 
Gets the number of matches and submatches. 
 
Basis for explicit traits specializations. 
 
bool operator!=(const regex_iterator &__rhs) const 
Tests the inequivalence of two regex iterators. 
 
A smart pointer with reference-counted copy semantics. 
 
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
 
const_reference prefix() const 
Gets a sub_match representing the match prefix. 
 
locale_type getloc() const 
Gets a copy of the current locale in use by the regex_traits object. 
 
basic_regex(const std::basic_string< _Ch_type, _Ch_traits, _Ch_alloc > &__s, flag_type __f=ECMAScript)
Constructs a basic regular expression from the string s interpreted according to the flags in f...
 
void swap(function< _Res(_Args...)> &__x, function< _Res(_Args...)> &__y)
Swap the targets of two polymorphic function object wrappers. 
 
flag_type flags() const 
Gets the flags used to construct the regular expression or in the last call to assign(). 
 
basic_regex< wchar_t > wregex
Standard wide-character regular expressions. 
 
basic_regex & operator=(const basic_regex &__rhs)
Assigns one regular expression to another. 
 
const_iterator cend() const noexcept
 
int compare(const basic_string &__str) const 
Compare to a string. 
 
regex_token_iterator< const wchar_t * > wcregex_token_iterator
Token iterator for C-style NULL-terminated wide strings. 
 
const_iterator cend() const 
Gets an iterator to one-past-the-end of the collection. 
 
bitset< _Nb > operator&(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets. 
 
_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 
 
regex_iterator & operator++()
Increments a regex_iterator. 
 
_Siter_base< _Iterator >::iterator_type __base(_Iterator __it)
 
regex_iterator operator++(int)
Postincrements a regex_iterator. 
 
A standard container which offers fixed time access to individual elements in any order...
 
Managing sequences of characters and character-like objects. 
 
int value(_Ch_type __ch, int __radix) const 
Converts a digit to an int. 
 
bool operator==(const regex_iterator &__rhs) const 
Tests the equivalence of two regex iterators. 
 
match_results(match_results &&__rhs) noexcept
Move constructs a match_results. 
 
back_insert_iterator< _Container > back_inserter(_Container &__x)
 
bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets. 
 
string_type str() const 
Gets the matching sequence as a string. 
 
regex_iterator()
Provides a singular iterator, useful for indicating one-past-the-end of a range. 
 
unsigned int mark_count() const 
Gets the number of marked subexpressions within the regular expression. 
 
string_type format(const char_type *__fmt, match_flag_type __flags=regex_constants::format_default) const 
 
const_iterator begin() const 
Gets an iterator to the start of the sub_match collection. 
 
regex_iterator(_Bi_iter __a, _Bi_iter __b, const regex_type &__re, regex_constants::match_flag_type __m=regex_constants::match_default)
 
sub_match< const wchar_t * > wcsub_match
Regex submatch over a C-style null-terminated wide string. 
 
bool empty() const noexcept
 
__size_type size_type
The allocator's size type.