Re:D is being used for autonomous driving research – Audi an...
by clappski on Tuesday June 25, 2019 @03:20AM
(#20271847)
constexpr is much more powerful than just generating constants (although that is one of the bigger use cases). One of the things I like is how it simplifies doing static dispatch on template types, essentially using SFINAE under the hood but in a much simpler way to read:
Vs
Being able to generate constants using the language itself is super powerful as well (the below is a bit contrived, as std::string_view is constexpr and obsoletes this pattern):
[ Parent
| on HN ]
There are no comments on this comment yet.