cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

Bugfix: Update for regex 20 lookbehind test.

Open MaxSagebaum opened this issue 6 months ago • 4 comments

Removed cpp file and added cpp2 file.

MaxSagebaum avatar Jun 23 '25 06:06 MaxSagebaum

Thanks! I pushed a commit that re-runs the regression tests to keep everything in sync.

While doing that, I noticed there seems to be a problem for MSVC here with cpp2regex.h2(591): error C2668: 'std::make_reverse_iterator': ambiguous call to overloaded function. Here's 591:

r := func(make_reverse_iterator(cur), make_reverse_match_context(ctx), true_end_func());

It seems the similar line 577 should also get this error, but doesn't because maybe that one is never invoked?

Conjecture: Maybe

  • lines 577 and 591 make*iterator calls should be std:: qualified, and

  • the make*iterator helpers on lines 184-189 should just be removed as they don't seem to be used?

But I'm not sure so I just pushed the update to regression tests in without any code changes.

hsutter avatar Jul 27 '25 00:07 hsutter

I will have a look during the week.

MaxSagebaum avatar Jul 28 '25 06:07 MaxSagebaum

Took a little longer until I had time.

MSVC seems to be confused by the argument dependent lookup. I implemented the make_reverse_iterator and make_forward_iterator functions as overloads in a different namespace. What I required was that a reverse iterator stays a reverse iterator and a forward iterator stays a forward iterator. I renamed the functions, this should remove the MSVC issue.

I will update the tests with the results from the ci so that it should be clean.

MaxSagebaum avatar Aug 08 '25 09:08 MaxSagebaum

Seems to be clean from a regex point of view. There are still some errors from MSVC at other places.

MaxSagebaum avatar Aug 08 '25 11:08 MaxSagebaum