Fix copying of extra match data when using ICU.

See: https://svn.boost.org/trac/boost/ticket/12130
This commit is contained in:
jzmaddock
2016-06-12 13:09:12 +01:00
parent acade9f20c
commit a824b7d236
3 changed files with 78 additions and 2 deletions

View File

@ -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>