$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: John Maddock (john_at_[hidden])
Date: 2004-05-14 05:24:32
> When searching for regex "(a)(?:b)" with the nosubs flag set, perl_matcher
cores with failed assertion "m.subs() > 2" in >perl_matcher.hpp,
match_results::set_second().
Confirmed: the patch that's going into cvs is at the end, if you don't want
to apply that then, pass match_nosubs to the matching algorithm in place of
compiling with nosubs.
John.
jm_at_fuji /cygdrive/c/data/boost/release/boost/boost/regex/v4
$ cvs diff -u
johnmaddock_at_[hidden]'s password:
cvs diff: Diffing .
Index: regex_compile.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/regex/v4/regex_compile.hpp,v
retrieving revision 1.11.2.3
diff -u -r1.11.2.3 regex_compile.hpp
--- regex_compile.hpp   12 May 2004 11:38:51 -0000      1.11.2.3
+++ regex_compile.hpp   14 May 2004 10:21:42 -0000
@@ -1435,7 +1435,8 @@
             {
             case traits_type::syntax_colon:
                static_cast<re_detail::re_brace*>(dat)->index = 0;
-               --marks;
+               if((_flags & nosubs) == 0)
+                  --marks;
                markid.pop();
                markid.push(0);
                ++ptr;
@@ -1445,7 +1446,8 @@
                markid.pop();
                markid.push(-1);
                common_forward_assert:
-               --marks;
+               if((_flags & nosubs) == 0)
+                  --marks;
                ++ptr;
                // extend:
                dat = add_simple(dat, re_detail::syntax_element_jump,
re_detail:
:re_jump_size);
@@ -1470,7 +1472,8 @@
             case traits_type::syntax_hash:
                // comment just skip it:
                static_cast<re_detail::re_brace*>(dat)->index = 0;
-               --marks;
+               if((_flags & nosubs) == 0)
+                  --marks;
                markid.pop();
                mark.pop();
                do{