Hacker News new | ask | show | jobs
by kindfellow92 3129 days ago
Constexpr is not necessary. Only required if you want to ensure that a variable is initialized with a pre-computed value. The compiler will optimize in either case if it can, regardless of the constexpr attribute.
1 comments

> Only required if you want to ensure that a variable is initialized with a pre-computed value

Yep.