-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
Description
Since C++20, common containers (std::string, std::vector, etc.) have constexpr supports (P0784). It might be possible to provide a pattern parser for pattern_formatter that parses literal constant pattern strings at compile-time.
At least for me, most of the use cases are constant pattern strings, so the compile-time parser could avoid the performance overhead and reduce attack vectors of dynamically parsing and building pattern instances at runtime.
@gabime Would you be interested in this feature? If you would be willing to merge it, I can find time in the next month to try and make it happen. I expect this will not introduce breaking changes.