by yakubin · 3y ago · 0 comments
static constexpr int kConstantName = 42;Sometimes when I use C++, I will namespace them however:
namespace constants {
static constexpr int name = 42;
}
…
int x = constants::name;
The exact name of the namespace would depend on the use and could be something more descriptive.