include/boost/regex/v5/regex_merge.hpp

100.0% Lines (2/2) 100.0% List of functions (1/1)
regex_merge.hpp
f(x) Functions (1)
Line TLA Hits Source Code
1 /*
2 *
3 * Copyright (c) 1998-2002
4 * John Maddock
5 *
6 * Use, modification and distribution are subject to the
7 * Boost Software License, Version 1.0. (See accompanying file
8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 *
10 */
11
12 /*
13 * LOCATION: see http://www.boost.org for most recent version.
14 * FILE regex_format.hpp
15 * VERSION see <boost/version.hpp>
16 * DESCRIPTION: Provides formatting output routines for search and replace
17 * operations. Note this is an internal header file included
18 * by regex.hpp, do not include on its own.
19 */
20
21 #ifndef BOOST_REGEX_V5_REGEX_MERGE_HPP
22 #define BOOST_REGEX_V5_REGEX_MERGE_HPP
23
24
25 namespace boost{
26
27 BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator, class traits, class charT>
28 2x inline OutputIterator regex_merge(OutputIterator out,
29 Iterator first,
30 Iterator last,
31 const basic_regex<charT, traits>& e,
32 const charT* fmt,
33 match_flag_type flags = match_default)
34 {
35 2x return regex_replace(out, first, last, e, fmt, flags);
36 }
37
38 BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class Iterator, class traits, class charT>
39 inline OutputIterator regex_merge(OutputIterator out,
40 Iterator first,
41 Iterator last,
42 const basic_regex<charT, traits>& e,
43 const std::basic_string<charT>& fmt,
44 match_flag_type flags = match_default)
45 {
46 return regex_merge(out, first, last, e, fmt.c_str(), flags);
47 }
48
49 BOOST_REGEX_MODULE_EXPORT template <class traits, class charT>
50 inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
51 const basic_regex<charT, traits>& e,
52 const charT* fmt,
53 match_flag_type flags = match_default)
54 {
55 return regex_replace(s, e, fmt, flags);
56 }
57
58 BOOST_REGEX_MODULE_EXPORT template <class traits, class charT>
59 inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
60 const basic_regex<charT, traits>& e,
61 const std::basic_string<charT>& fmt,
62 match_flag_type flags = match_default)
63 {
64 return regex_replace(s, e, fmt, flags);
65 }
66
67 } // namespace boost
68
69 #endif // BOOST_REGEX_V5_REGEX_MERGE_HPP
70
71
72