I understand that the constexpr variable can be used in compiletime. For example, for a template or static helper.
But if I want to do this without constexpr, I can with static const .
What is it since C ++ 11/14 introduced constexpr the difference between
constexpr int a = 3;
Thanks!
Another way to see this question is: which should I use?
c ++ c ++ 11 static-variables constexpr
dzada
source share