Let's say I have an application that has some default values.
Is there any significant difference between:
const int MEANING_OF_LIFE = 42;
and:
constexpr int MEANING_OF_LIFE = 42;
?
I understand that constexpr
value can be used as parameters in constexpr
functions, but what is if I only assign these values to some variables?
UPDATE:
This question is different from Difference between `constexpr` and `const` because it talks about a specific context of constexpr
usage and requires a specific answer.