From f6a9bce728c8451d212836460aece6dfb7aa0896 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 2 Dec 2014 09:31:42 +0000 Subject: [PATCH] Fix icu behaviour with partial matches. See https://svn.boost.org/trac/boost/ticket/10114 --- include/boost/regex/icu.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/icu.hpp b/include/boost/regex/icu.hpp index 37fec2ac..572172e5 100644 --- a/include/boost/regex/icu.hpp +++ b/include/boost/regex/icu.hpp @@ -397,10 +397,10 @@ void copy_results(MR1& out, MR2 const& in) out.set_base(in.base().base()); for(int i = 0; i < (int)in.size(); ++i) { - if(in[i].matched) + if(in[i].matched || !i) { out.set_first(in[i].first.base(), i); - out.set_second(in[i].second.base(), i); + out.set_second(in[i].second.base(), i, in[i].matched); } } }