On Tue, Sep 24, 2019 at 1:51 PM Niall Douglas via Boost < boost@lists.boost.org> wrote:
In the medium-long term, we may be interested in using Boost.Regex to replace our regex implementation (when we can break ABI).
You wouldn't prefer Hana's really cool constexpr one instead with the much superior performance?
(I appreciate it isn't conforming, but I'd like there to be some day a fully conforming implementation using that technology i.e. you to write it Stephan will all that free time you have!)
I assume the disadvantage of Hana library is that it is not used as much as boost so it is *probably *more buggy, and I am not sure it can easily be wrapped to match the std:: stuff since in my experience it is impossible to dispatch code to constexpr and nonconstexpr implementation. By this I mean const std::string s("bla"); std::regex r1(s); std::regex r2(s + std::to_string(time(NULL))); //NULL to upset STL
Here r1 and r2 look the same to the poor regex constructor, although one is known at compile time. disclaimer: I admit I did not follow C++20 standardization so maybe those nice people from WG21 gave us some magic tools to do this.