From 7158ab573408c115da88d7496e62428c7f5889e7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 25 Sep 2013 21:13:11 +0000 Subject: [PATCH] Regex: Remove use of obsolete macro for template types and args. [SVN r85914] --- include/boost/regex/mfc.hpp | 56 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/include/boost/regex/mfc.hpp b/include/boost/regex/mfc.hpp index 5fe7f810..8ecaf1f5 100644 --- a/include/boost/regex/mfc.hpp +++ b/include/boost/regex/mfc.hpp @@ -38,9 +38,9 @@ typedef regex_token_iterator tregex_token_iterator; // // define regex creation functions: // -template +template inline basic_regex -make_regex(const ATL::CSimpleStringT& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) +make_regex(const ATL::CSimpleStringT& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) { basic_regex result(s.GetString(), s.GetString() + s.GetLength(), f); return result; @@ -48,8 +48,8 @@ make_regex(const ATL::CSimpleStringT& s, ::boost::regex_ // // regex_match overloads: // -template -inline bool regex_match(const ATL::CSimpleStringT& s, +template +inline bool regex_match(const ATL::CSimpleStringT& s, match_results& what, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) @@ -61,8 +61,8 @@ inline bool regex_match(const ATL::CSimpleStringT& s, f); } -template -inline bool regex_match(const ATL::CSimpleStringT& s, +template +inline bool regex_match(const ATL::CSimpleStringT& s, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { @@ -74,8 +74,8 @@ inline bool regex_match(const ATL::CSimpleStringT& s, // // regex_search overloads: // -template -inline bool regex_search(const ATL::CSimpleStringT& s, +template +inline bool regex_search(const ATL::CSimpleStringT& s, match_results& what, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) @@ -87,8 +87,8 @@ inline bool regex_search(const ATL::CSimpleStringT& s, f); } -template -inline bool regex_search(const ATL::CSimpleStringT& s, +template +inline bool regex_search(const ATL::CSimpleStringT& s, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { @@ -100,45 +100,45 @@ inline bool regex_search(const ATL::CSimpleStringT& s, // // regex_iterator creation: // -template +template inline regex_iterator -make_regex_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +make_regex_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, f); return result; } -template +template inline regex_token_iterator - make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) + make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f); return result; } -template +template inline regex_token_iterator -make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const std::vector& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const std::vector& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } -template +template inline regex_token_iterator -make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } template + class B, bool b> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex& e, - const ATL::CSimpleStringT& fmt, + const ATL::CSimpleStringT& fmt, match_flag_type flags = match_default) { return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags); @@ -146,12 +146,12 @@ OutputIterator regex_replace(OutputIterator out, namespace re_detail{ -template +template class mfc_string_out_iterator { - ATL::CSimpleStringT* out; + ATL::CSimpleStringT* out; public: - mfc_string_out_iterator(ATL::CSimpleStringT& s) : out(&s) {} + mfc_string_out_iterator(ATL::CSimpleStringT& s) : out(&s) {} mfc_string_out_iterator& operator++() { return *this; } mfc_string_out_iterator& operator++(int) { return *this; } mfc_string_out_iterator& operator*() { return *this; } @@ -169,14 +169,14 @@ public: } -template -ATL::CSimpleStringT regex_replace(const ATL::CSimpleStringT& s, +template +ATL::CSimpleStringT regex_replace(const ATL::CSimpleStringT& s, const basic_regex& e, - const ATL::CSimpleStringT& fmt, + const ATL::CSimpleStringT& fmt, match_flag_type flags = match_default) { - ATL::CSimpleStringT result(s.GetManager()); - re_detail::mfc_string_out_iterator i(result); + ATL::CSimpleStringT result(s.GetManager()); + re_detail::mfc_string_out_iterator i(result); regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags); return result; }