regex_compiler.h (__detail::_AnyMatcher, [...]): Remove redundant _CharT template parameters.

* include/bits/regex_compiler.h (__detail::_AnyMatcher,
	__detail::_CharMatcher, __detail::_BracketMatcher): Remove redundant
	_CharT template parameters.
	* include/bits/regex_compiler.tcc: Likewise.

From-SVN: r204573
This commit is contained in:
Jonathan Wakely 2013-11-08 14:30:34 +00:00 committed by Jonathan Wakely
parent 68e69ce27f
commit bb038ece8f
3 changed files with 19 additions and 11 deletions

View File

@ -23,6 +23,11 @@
* include/bits/regex.h (basic_regex): Assert char_type matches. Use
__compile_nfa object generator. Remove _CharT template parameter.
* include/bits/regex_compiler.h (__detail::_AnyMatcher,
__detail::_CharMatcher, __detail::_BracketMatcher): Remove redundant
_CharT template parameters.
* include/bits/regex_compiler.tcc: Likewise.
2013-11-06 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/regex_automaton.h (_S_opcode_word_boundry): Rename to

View File

@ -39,7 +39,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @{
*/
template<typename _CharT, typename _TraitsT>
template<typename _TraitsT>
struct _BracketMatcher;
/// Builds an NFA from an input iterator interval.
@ -59,13 +59,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return make_shared<_RegexT>(std::move(_M_nfa)); }
private:
typedef typename _TraitsT::char_type _CharT;
typedef _Scanner<_FwdIter> _ScannerT;
typedef typename _ScannerT::_TokenT _TokenT;
typedef _StateSeq<_TraitsT> _StateSeqT;
typedef std::stack<_StateSeqT, std::vector<_StateSeqT>> _StackT;
typedef _BracketMatcher<_CharT, _TraitsT> _BMatcherT;
typedef std::ctype<_CharT> _CtypeT;
typedef _BracketMatcher<_TraitsT> _BMatcherT;
typedef std::ctype<typename _TraitsT::char_type> _CtypeT;
// accepts a specific token or returns false.
bool
@ -139,9 +138,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return _Cmplr(__first, __last, __traits, __flags)._M_get_nfa();
}
template<typename _CharT, typename _TraitsT>
template<typename _TraitsT>
struct _AnyMatcher
{
typedef typename _TraitsT::char_type _CharT;
explicit
_AnyMatcher(const _TraitsT& __traits)
: _M_traits(__traits)
@ -159,9 +160,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const _TraitsT& _M_traits;
};
template<typename _CharT, typename _TraitsT>
template<typename _TraitsT>
struct _CharMatcher
{
typedef typename _TraitsT::char_type _CharT;
typedef regex_constants::syntax_option_type _FlagT;
explicit
@ -188,9 +190,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
/// Matches a character range (bracket expression)
template<typename _CharT, typename _TraitsT>
template<typename _TraitsT>
struct _BracketMatcher
{
typedef typename _TraitsT::char_type _CharT;
typedef typename _TraitsT::char_class_type _CharClassT;
typedef typename _TraitsT::string_type _StringT;
typedef regex_constants::syntax_option_type _FlagT;

View File

@ -286,11 +286,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (_M_match_token(_ScannerT::_S_token_anychar))
_M_stack.push(_StateSeqT(_M_nfa,
_M_nfa._M_insert_matcher
(_AnyMatcher<_CharT, _TraitsT>(_M_traits))));
(_AnyMatcher<_TraitsT>(_M_traits))));
else if (_M_try_char())
_M_stack.push(_StateSeqT(_M_nfa,
_M_nfa._M_insert_matcher
(_CharMatcher<_CharT, _TraitsT>(_M_value[0],
(_CharMatcher<_TraitsT>(_M_value[0],
_M_traits,
_M_flags))));
else if (_M_match_token(_ScannerT::_S_token_backref))
@ -430,9 +430,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __v;
}
template<typename _CharT, typename _TraitsT>
template<typename _TraitsT>
bool
_BracketMatcher<_CharT, _TraitsT>::operator()(_CharT __ch) const
_BracketMatcher<_TraitsT>::operator()(_CharT __ch) const
{
bool __ret = false;
if (_M_traits.isctype(__ch, _M_class_set)