Quick Q: What's the difference between constexpr and const? -- StackOverflow
C++11's
const and constexpr have somewhat different purposes, but similar names. Hence the natural question:
Difference between
constexprandconstWhat's the difference between
constexprandconst?
- When can I use only one of them?
- When can I use both and how should I choose one?



