|
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_V4_REGEX_MERGE_HPP |
|
22 #define BOOST_REGEX_V4_REGEX_MERGE_HPP |
|
23 |
|
24 |
|
25 namespace boost{ |
|
26 |
|
27 #ifdef BOOST_MSVC |
|
28 #pragma warning(push) |
|
29 #pragma warning(disable: 4103) |
|
30 #endif |
|
31 #ifdef BOOST_HAS_ABI_HEADERS |
|
32 # include BOOST_ABI_PREFIX |
|
33 #endif |
|
34 #ifdef BOOST_MSVC |
|
35 #pragma warning(pop) |
|
36 #endif |
|
37 |
|
38 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 charT* fmt, |
|
44 match_flag_type flags = match_default) |
|
45 { |
|
46 return regex_replace(out, first, last, e, fmt, flags); |
|
47 } |
|
48 |
|
49 template <class OutputIterator, class Iterator, class traits, class charT> |
|
50 inline OutputIterator regex_merge(OutputIterator out, |
|
51 Iterator first, |
|
52 Iterator last, |
|
53 const basic_regex<charT, traits>& e, |
|
54 const std::basic_string<charT>& fmt, |
|
55 match_flag_type flags = match_default) |
|
56 { |
|
57 return regex_merge(out, first, last, e, fmt.c_str(), flags); |
|
58 } |
|
59 |
|
60 template <class traits, class charT> |
|
61 inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s, |
|
62 const basic_regex<charT, traits>& e, |
|
63 const charT* fmt, |
|
64 match_flag_type flags = match_default) |
|
65 { |
|
66 return regex_replace(s, e, fmt, flags); |
|
67 } |
|
68 |
|
69 template <class traits, class charT> |
|
70 inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s, |
|
71 const basic_regex<charT, traits>& e, |
|
72 const std::basic_string<charT>& fmt, |
|
73 match_flag_type flags = match_default) |
|
74 { |
|
75 return regex_replace(s, e, fmt, flags); |
|
76 } |
|
77 |
|
78 #ifdef BOOST_MSVC |
|
79 #pragma warning(push) |
|
80 #pragma warning(disable: 4103) |
|
81 #endif |
|
82 #ifdef BOOST_HAS_ABI_HEADERS |
|
83 # include BOOST_ABI_SUFFIX |
|
84 #endif |
|
85 #ifdef BOOST_MSVC |
|
86 #pragma warning(pop) |
|
87 #endif |
|
88 |
|
89 } // namespace boost |
|
90 |
|
91 #endif // BOOST_REGEX_V4_REGEX_MERGE_HPP |
|
92 |
|
93 |