mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 13:52:17 +02:00
Fix copying of extra match data when using ICU.
See: https://svn.boost.org/trac/boost/ticket/12130
This commit is contained in:
@ -403,6 +403,22 @@ void copy_results(MR1& out, MR2 const& in)
|
||||
out.set_second(in[i].second.base(), i, in[i].matched);
|
||||
}
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
// Copy full capture info as well:
|
||||
for(int i = 0; i < (int)in.size(); ++i)
|
||||
{
|
||||
if(in[i].captures().size())
|
||||
{
|
||||
out[i].get_captures().assign(in[i].captures().size(), typename MR1::value_type());
|
||||
for(int j = 0; j < out[i].captures().size(); ++j)
|
||||
{
|
||||
out[i].get_captures()[j].first = in[i].captures()[j].first.base();
|
||||
out[i].get_captures()[j].second = in[i].captures()[j].second.base();
|
||||
out[i].get_captures()[j].matched = in[i].captures()[j].matched;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
|
Reference in New Issue
Block a user