5 ms·
You should watch the talk that's mentioned in the article. They demo a constexpr json parser and a constexpr regex engine.
by teamhappy 9y ago
You should watch the talk that's mentioned in the article. They demo a constexpr json parser and a constexpr regex engine.
- lazyjones 9y agoI tried to watch the more interesting parts, it just doesn't seem like a useful approach to me to try to get the compiler to do this work at every compilation instead of the traditional approach of doing it once by generating C(++) code/structures from text/json data in my build. Especially with the "cognitive cost" and debugging issues involved.
- teamhappy 9y agoFair enough. I assumed you didn't consider the more complex use-cases because you mentioned compilers already doing this for small functions.
- CamperBob2 9y agoExactly. This technique will be high on my list of things to try the next time I find myself complaining that my compiler is too fast. Yet another C++ innovation that solves a problem that no one actually has.