This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix regex `nosubs` correctly


On Tue, Jan 21, 2014 at 5:08 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> What does Boost.Regex do?

My conclusion is actually based on Boost.Regex's behavior.
boost::basic_regex::mark_count() returns 1 with nosubs flag. Note that
boost::basic_regex::mark_count() == std::basic_regex::mark_count() +
1, because std does not count the 0th capture (the whole regex) in.
libc++'s mark_count returns 0 as well.


-- 
Regards,
Tim Shen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]