enum class _RegexExecutorPolicy : int { _S_auto, _S_alternate };
template<typename _BiIter, typename _Alloc,
- typename _CharT, typename _TraitsT,
- _RegexExecutorPolicy __policy,
- bool __match_mode>
+ typename _CharT, typename _TraitsT>
bool
- __regex_algo_impl(_BiIter __s,
- _BiIter __e,
+ __regex_algo_impl(_BiIter __s, _BiIter __e,
match_results<_BiIter, _Alloc>& __m,
const basic_regex<_CharT, _TraitsT>& __re,
- regex_constants::match_flag_type __flags);
+ regex_constants::match_flag_type __flags,
+ _RegexExecutorPolicy __policy,
+ bool __match_mode);
template<typename, typename, typename, bool>
class _Executor;
_M_flags = __f;
}
- template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
- __detail::_RegexExecutorPolicy, bool>
+ template<typename _Bp, typename _Ap, typename _Cp, typename _Rp>
friend bool
__detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
const basic_regex<_Cp, _Rp>&,
- regex_constants::match_flag_type);
+ regex_constants::match_flag_type,
+ _RegexExecutorPolicy, bool);
template<typename, typename, typename, bool>
friend class __detail::_Executor;
template<typename, typename, typename, bool>
friend class __detail::_Executor;
- template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
- __detail::_RegexExecutorPolicy, bool>
+ template<typename _Bp, typename _Ap, typename _Cp, typename _Rp>
friend bool
__detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
const basic_regex<_Cp, _Rp>&,
- regex_constants::match_flag_type);
+ regex_constants::match_flag_type,
+ _RegexExecutorPolicy, bool);
// Reset contents to __size unmatched sub_match objects
// (plus additional objects for prefix, suffix and unmatched sub).
regex_constants::match_flag_type __flags
= regex_constants::match_default)
{
- return __detail::__regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
- __detail::_RegexExecutorPolicy::_S_auto, true>
- (__s, __e, __m, __re, __flags);
+ return __detail::__regex_algo_impl(__s, __e, __m, __re, __flags,
+ __detail::_RegexExecutorPolicy::_S_auto, true);
}
/**
regex_constants::match_flag_type __flags
= regex_constants::match_default)
{
- return __detail::__regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
- __detail::_RegexExecutorPolicy::_S_auto, false>
- (__s, __e, __m, __re, __flags);
+ return __detail::__regex_algo_impl(__s, __e, __m, __re, __flags,
+ __detail::_RegexExecutorPolicy::_S_auto, false);
}
/**
//
// That __match_mode is true means regex_match, else regex_search.
template<typename _BiIter, typename _Alloc,
- typename _CharT, typename _TraitsT,
- _RegexExecutorPolicy __policy,
- bool __match_mode>
+ typename _CharT, typename _TraitsT>
bool
__regex_algo_impl(_BiIter __s,
_BiIter __e,
match_results<_BiIter, _Alloc>& __m,
const basic_regex<_CharT, _TraitsT>& __re,
- regex_constants::match_flag_type __flags)
+ regex_constants::match_flag_type __flags,
+ _RegexExecutorPolicy __policy,
+ bool __match_mode)
{
if (__re._M_automaton == nullptr)
return false;
= std::regex_constants::match_default)
{
using namespace std::__detail;
- auto __res1 = __regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
- _RegexExecutorPolicy::_S_auto, true>
- (__s, __e, __m, __re, __flags);
+ auto __res1 = __regex_algo_impl(__s, __e, __m, __re, __flags,
+ _RegexExecutorPolicy::_S_auto,
+ true);
match_results<_Bi_iter, _Alloc> __mm;
- auto __res2 = __regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
- _RegexExecutorPolicy::_S_alternate, true>
- (__s, __e, __mm, __re, __flags);
+ auto __res2 = __regex_algo_impl(__s, __e, __mm, __re, __flags,
+ _RegexExecutorPolicy::_S_alternate,
+ true);
if (__res1 == __res2 && __m == __mm)
return __res1;
throw std::exception();
= std::regex_constants::match_default)
{
using namespace std::__detail;
- auto __res1 = __regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
- _RegexExecutorPolicy::_S_auto, false>
- (__s, __e, __m, __re, __flags);
+ auto __res1 = __regex_algo_impl(__s, __e, __m, __re, __flags,
+ _RegexExecutorPolicy::_S_auto,
+ false);
match_results<_Bi_iter, _Alloc> __mm;
- auto __res2 = __regex_algo_impl<_Bi_iter, _Alloc, _Ch_type, _Rx_traits,
- _RegexExecutorPolicy::_S_alternate, false>
- (__s, __e, __mm, __re, __flags);
+ auto __res2 = __regex_algo_impl(__s, __e, __mm, __re, __flags,
+ _RegexExecutorPolicy::_S_alternate,
+ false);
if (__res1 == __res2 && __m == __mm)
return __res1;
throw(std::exception()); // Let test fail. Give it a name.