|
After some research, I think that we may be able to simply substitute the word 'std' for 'boost' and it works because the standard library is interfacing the boost library and the function calls are all the same. I understand that std::regexp is defined with ECMAScript as opposed to PCRE, but according to the table in (https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines#Language_features) as long as we don't use recursion or look ahead (which we don't) then they have the same functionality and I have not found anything in the syntax specifications that would suggest they are not compatible. Thus, I made the changes in both array_filter.cpp and mongo_uri.cpp and then ran their corresponding test files and they worked perfectly.
|
|
Please note that in the above (closed) code review, it was pointed out that we were using boost::regex in PCRE mode. However, std::regex, with which we wanted to replace it, does not support PCRE. Since that review, another instance of boost::regex usage has been added, so that problem now exists in side update/array_filter.cpp.
When fixing this ticket, either:
- Those usages of boost::regex should be replaced with direct usage of libpcre (which we have vendored). This would have the advantage that we could presumably use the regex unchanged.
- Those usages of boost::regex should be replaced with std::regex, using a different regex form. The regex strings will need to be translated to the new domain.
|