2 ms·
Never mind the operand order; what do we gain by using constexpr instead of const? In C++, const int x = 3 is already a constant. As of C++98 already, you can
by kazinator 4y ago
Never mind the operand order; what do we gain by using constexpr instead of const?
In C++, const int x = 3 is already a constant. As of C++98 already, you can use x as a case label in a switch statement.
It cannot be any more constant.
Not cool any more?
- ncmncm 4y agoYou just want to ensure they don't take up space in your struct body. Otherwise, const is fine.