diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-04-11 18:19:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-04-11 19:20:07 (GMT) |
commit | 857e44c156a1dbefcb49bb5792c4384cebd8762a (patch) | |
tree | 11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp | |
parent | 77d4eb7588e113beaa03f3347523b26adefdeb06 (diff) | |
download | swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2 |
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp index c4544c0..ac8e3c8 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_replace.hpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 1998-2002 + * Copyright (c) 1998-2009 * John Maddock * * Use, modification and distribution are subject to the @@ -35,12 +35,12 @@ namespace boost{ #pragma warning(pop) #endif -template <class OutputIterator, class BidirectionalIterator, class traits, class charT> +template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, - const charT* fmt, + Formatter fmt, match_flag_type flags = match_default) { regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags); @@ -69,21 +69,10 @@ OutputIterator regex_replace(OutputIterator out, return out; } -template <class OutputIterator, class Iterator, class traits, class charT> -inline OutputIterator regex_replace(OutputIterator out, - Iterator first, - Iterator last, - const basic_regex<charT, traits>& e, - const std::basic_string<charT>& fmt, - match_flag_type flags = match_default) -{ - return regex_replace(out, first, last, e, fmt.c_str(), flags); -} - -template <class traits, class charT> +template <class traits, class charT, class Formatter> std::basic_string<charT> regex_replace(const std::basic_string<charT>& s, const basic_regex<charT, traits>& e, - const charT* fmt, + Formatter fmt, match_flag_type flags = match_default) { std::basic_string<charT> result; @@ -92,18 +81,6 @@ std::basic_string<charT> regex_replace(const std::basic_string<charT>& s, return result; } -template <class traits, class charT> -std::basic_string<charT> regex_replace(const std::basic_string<charT>& s, - const basic_regex<charT, traits>& e, - const std::basic_string<charT>& fmt, - match_flag_type flags = match_default) -{ - std::basic_string<charT> result; - re_detail::string_out_iterator<std::basic_string<charT> > i(result); - regex_replace(i, s.begin(), s.end(), e, fmt.c_str(), flags); - return result; -} - #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) |