Opened 9 years ago

Closed 9 years ago

#9227 closed Bugs (fixed)

boost::regex match_count off by 1

Reported by: spoo@… Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

#include <boost/regex.hpp>

int main(int, char **)
{
	boost::regex r("(a)");
	std::cout << r.mark_count(); 
	return 0;
}

prints out "2" instead of "1". Both libc++ and libstdc++ print out "1".

This was discussed in 2007 as well I believe, but I couldn't find any other mention of the issue: [regex] regex::mark_count() incorrect? (I can't post the link since trac rejects my submission)

Change History (1)

comment:1 by John Maddock, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in Git develop

Note: See TracTickets for help on using tickets.