summaryrefslogtreecommitdiff
path: root/boost/regex/icu.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:11:01 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:11:01 +0900
commit3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch)
tree5c1733853892b8397d67706fa453a9bd978d2102 /boost/regex/icu.hpp
parent88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff)
downloadboost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/regex/icu.hpp')
-rw-r--r--boost/regex/icu.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/boost/regex/icu.hpp b/boost/regex/icu.hpp
index 8be8e60ae9..cdae1c8bb7 100644
--- a/boost/regex/icu.hpp
+++ b/boost/regex/icu.hpp
@@ -19,6 +19,7 @@
#ifndef BOOST_REGEX_ICU_HPP
#define BOOST_REGEX_ICU_HPP
+#include <boost/config.hpp>
#include <unicode/utypes.h>
#include <unicode/uchar.h>
#include <unicode/coll.h>
@@ -389,12 +390,13 @@ inline u32regex make_u32regex(const U_NAMESPACE_QUALIFIER UnicodeString& s, boos
// regex_match overloads that widen the character type as appropriate:
//
namespace BOOST_REGEX_DETAIL_NS{
-template<class MR1, class MR2>
-void copy_results(MR1& out, MR2 const& in)
+template<class MR1, class MR2, class NSubs>
+void copy_results(MR1& out, MR2 const& in, NSubs named_subs)
{
// copy results from an adapted MR2 match_results:
out.set_size(in.size(), in.prefix().first.base(), in.suffix().second.base());
out.set_base(in.base().base());
+ out.set_named_subs(named_subs);
for(int i = 0; i < (int)in.size(); ++i)
{
if(in[i].matched || !i)
@@ -443,7 +445,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
match_type what;
bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
// copy results across to m:
- if(result) copy_results(m, what);
+ if(result) copy_results(m, what, e.get_named_subs());
return result;
}
template <class BidiIterator, class Allocator>
@@ -459,7 +461,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
match_type what;
bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
// copy results across to m:
- if(result) copy_results(m, what);
+ if(result) copy_results(m, what, e.get_named_subs());
return result;
}
} // namespace BOOST_REGEX_DETAIL_NS
@@ -618,7 +620,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
match_type what;
bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
// copy results across to m:
- if(result) copy_results(m, what);
+ if(result) copy_results(m, what, e.get_named_subs());
return result;
}
template <class BidiIterator, class Allocator>
@@ -635,7 +637,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
match_type what;
bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
// copy results across to m:
- if(result) copy_results(m, what);
+ if(result) copy_results(m, what, e.get_named_subs());
return result;
}
}