diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-14 10:04:04 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-14 10:04:04 +0000 |
commit | 4f24f8e22f385f8e081e5a7f197ee90038f0de69 (patch) | |
tree | 6b2bfb283835bbe1f5cecfce9fb824f6f76acc2f /libstdc++-v3/include/bits/regex_compiler.h | |
parent | d515cef55e3c9690e8494ca9ea729f81c4988ef1 (diff) | |
download | ppe42-gcc-4f24f8e22f385f8e081e5a7f197ee90038f0de69.tar.gz ppe42-gcc-4f24f8e22f385f8e081e5a7f197ee90038f0de69.zip |
2011-02-14 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/regex_compiler.h: Remove unnecessary bind() calls.
* include/bits/regex_nfa.h: Remove unnecessary base classes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170124 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/regex_compiler.h')
-rw-r--r-- | libstdc++-v3/include/bits/regex_compiler.h | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h index 5cfd1929cff..eda4e357cf0 100644 --- a/libstdc++-v3/include/bits/regex_compiler.h +++ b/libstdc++-v3/include/bits/regex_compiler.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -714,23 +714,18 @@ namespace __regex : _M_traits(__traits), _M_scanner(__b, __e, __flags, _M_traits.getloc()), _M_state_store(__flags) { - using std::bind; - using std::placeholders::_1; - using std::placeholders::_2; typedef _StartTagger<_InIter, _TraitsT> _Start; typedef _EndTagger<_InIter, _TraitsT> _End; _StateSeq __r(_M_state_store, - _M_state_store._M_insert_subexpr_begin( - bind(_Start(0), _1, _2))); + _M_state_store._M_insert_subexpr_begin(_Start(0))); _M_disjunction(); if (!_M_stack.empty()) { __r._M_append(_M_stack.top()); _M_stack.pop(); } - __r._M_append(_M_state_store. - _M_insert_subexpr_end(0, bind(_End(0), _1, _2))); + __r._M_append(_M_state_store._M_insert_subexpr_end(0, _End(0))); __r._M_append(_M_state_store._M_insert_accept()); } @@ -905,9 +900,6 @@ namespace __regex _Compiler<_InIter, _TraitsT>:: _M_atom() { - using std::bind; - using std::placeholders::_1; - using std::placeholders::_2; typedef _CharMatcher<_InIter, _TraitsT> _CMatcher; typedef _StartTagger<_InIter, _TraitsT> _Start; typedef _EndTagger<_InIter, _TraitsT> _End; @@ -915,26 +907,23 @@ namespace __regex if (_M_match_token(_ScannerT::_S_token_anychar)) { _M_stack.push(_StateSeq(_M_state_store, - _M_state_store. - _M_insert_matcher(bind(_AnyMatcher, _1)))); + _M_state_store._M_insert_matcher + (_AnyMatcher))); return true; } if (_M_match_token(_ScannerT::_S_token_ord_char)) { - _M_stack.push(_StateSeq - (_M_state_store, _M_state_store. - _M_insert_matcher - (bind(_CMatcher(_M_cur_value[0], _M_traits), _1)))); + _M_stack.push(_StateSeq(_M_state_store, + _M_state_store._M_insert_matcher + (_CMatcher(_M_cur_value[0], _M_traits)))); return true; } if (_M_match_token(_ScannerT::_S_token_quoted_char)) { // note that in the ECMA grammar, this case covers backrefs. _M_stack.push(_StateSeq(_M_state_store, - _M_state_store. - _M_insert_matcher - (bind(_CMatcher(_M_cur_value[0], _M_traits), - _1)))); + _M_state_store._M_insert_matcher + (_CMatcher(_M_cur_value[0], _M_traits)))); return true; } if (_M_match_token(_ScannerT::_S_token_backref)) @@ -947,7 +936,7 @@ namespace __regex int __mark = _M_state_store._M_sub_count(); _StateSeq __r(_M_state_store, _M_state_store. - _M_insert_subexpr_begin(bind(_Start(__mark), _1, _2))); + _M_insert_subexpr_begin(_Start(__mark))); this->_M_disjunction(); if (!_M_match_token(_ScannerT::_S_token_subexpr_end)) __throw_regex_error(regex_constants::error_paren); @@ -957,7 +946,7 @@ namespace __regex _M_stack.pop(); } __r._M_append(_M_state_store._M_insert_subexpr_end - (__mark, bind(_End(__mark), _1, _2))); + (__mark, _End(__mark))); _M_stack.push(__r); return true; } @@ -969,8 +958,6 @@ namespace __regex _Compiler<_InIter, _TraitsT>:: _M_bracket_expression() { - using std::bind; - using std::placeholders::_1; if (_M_match_token(_ScannerT::_S_token_bracket_begin)) { _RMatcherT __matcher(_M_match_token(_ScannerT::_S_token_line_begin), @@ -979,8 +966,7 @@ namespace __regex || !_M_match_token(_ScannerT::_S_token_bracket_end)) __throw_regex_error(regex_constants::error_brack); _M_stack.push(_StateSeq(_M_state_store, - _M_state_store._M_insert_matcher - (bind(__matcher, _1)))); + _M_state_store._M_insert_matcher(__matcher))); return true; } return false; |