Page MenuHomePhabricator

Use raw string comparison instead of std::regex , as it is clearly not mature.
ClosedPublic

Authored by deadalnix on Jul 3 2017, 11:25.

Details

Summary

It seems to be hard to find a way to get regex to work properly across plateforms, so it seems like it is a better idea to just not use it.

Test Plan

Run the tests suite.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Ok -- apologies but I'm a phabricator nub. How do I find out what systems it broke on? Any build logs or anything?

Sorry -- I wouldn't have thought C++ regex's would be so picky. I tested it on clang and on old g++ 4.8 and was satisfied.. i guess that was not enough.

Just remove the use of std::regex instead of reverting.

deadalnix retitled this revision from Revert "Fixed runtime error on older gcc/g++ (<4.9) where std::reg_ex is non-standards compliant and produced a regex compile fail. This new simpler regex does not trip up even broken libstdc++ std::regex implementations." to Use raw string comparison instead of std::regex , as it is clearly not mature..Jul 3 2017, 12:07
deadalnix edited the summary of this revision. (Show Details)

Fixes the test on my system (which is not plain Debian 8).

I concur with the assessment not to use std::regex , at least until the issues with it are sorted out.
One approach would be to construct a separate test for features we wish to use from it, and only stick to such working features.

In the meantime, let's pull it out.

This revision is now accepted and ready to land.Jul 3 2017, 12:21
This revision was automatically updated to reflect the committed changes.