]> gcc.gnu.org Git - gcc.git/commitdiff
regex_compiler.h (__detail::_AnyMatcher, [...]): Remove redundant _CharT template...
authorJonathan Wakely <jwakely.gcc@gmail.com>
Fri, 8 Nov 2013 14:30:34 +0000 (14:30 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 8 Nov 2013 14:30:34 +0000 (14:30 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex_compiler.h
libstdc++-v3/include/bits/regex_compiler.tcc

index c8cd18545a610750b0199ea782a7e32006f657c2..93203c243e00db893ff030cff94d4d452382fca4 100644 (file)
        * 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
index fef8862487251fed6e4bc3621ecee0cdca775faa..406d9a9fd6b118f547d572af6323d1a4f8813ffe 100644 (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;
index 49c32b8a0ed04e7a05c84636ea716cf8d0807c05..f89498f35ed36811426b56a5759b798b7139db51 100644 (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)
This page took 0.068334 seconds and 5 git commands to generate.