On 04/09/17 03:31 -0700, Tim Shen via libstdc++ wrote:
This fixes the follow-up comments in 71500.

Back-reference matching is different from other matching, as the
content the back-reference refers to is at "run-time", aka during
regex_match(), not regex() compilation.

For compilation we do have an abstraction layer to catch all
comparison customizations, namely _M_translator in regex_compiler.h.
Until this patch, we don't have an abstraction for "run-time"
matching. I believe that back-reference is the only place that needs
run-time matching, so I just build a _Backref_matcher in
regex_executot.tcc.

Looks like a nice solution. OK for trunk, thanks.

I think this looks safe to backport too, but let's leave it on trunk
for a while first.


Reply via email to