Subject: [Boost-bugs] [Boost C++ Libraries] #13535: xpressive miss captured groups name while assign a match_results object to another.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-04-23 10:48:24
#13535: xpressive miss captured groups name while assign a match_results object to
another.
---------------------------------------+--------------------------
Reporter: hyd <ruoleng@â¦> | Owner: Eric Niebler
Type: Bugs | Status: new
Milestone: To Be Determined | Component: xpressive
Version: Boost 1.67.0 | Severity: Problem
Keywords: xpressive captured groups |
---------------------------------------+--------------------------
example:
{{{
cmatch match;
cmatch mat2;
cregex rex = tcompile("(?P<ErrorCode>\\d{5})");
if( regex_match("error10205",match,rex) )
{
mat2 = match;
string strErr = mat["ErrorCode"]; // Here will not get the match
string
}
}}}
It's cause by funciton:
**void swap(match_results<BidiIter> &that)**
in **match_results.hpp** file.
I had fix the bug, by adding
== this->named_marks_.swap(that.named_marks_);
after line 668.
-- Ticket URL: <https://svn.boost.org/trac10/ticket/13535> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2018-04-23 10:55:03 UTC