[Patch] Fix regex `nosubs` correctly
Tue Jan 21 19:39:00 GMT 2014
On 21/01/14 14:14 -0500, Tim Shen wrote:
>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.
OK, thanks for confirming that. In that case your patch is OK to
I'll raise a defect report against the standard as I don't think the
specification of nosubs is clear. If that's what it means then it
should be defined in terms of "marked sub-expressions" not just by
stating the effect it has on match_results objects.
More information about the Libstdc++