* Sehcra:
I'm trying to figure out if what I'm doing makes any sense. I created
a namespace that contains some functions as well as some constants.
Because these variables are constant, I have no need for there to be
more than one copy of them. Does it make sense to make these
variables static const, or do I just make them const?
At namespace scope a constant already has internal linkage by default, so
adding 'static' is only adding a deprecated feature that does nothing.
And if these definitions are in a header file, the result is any way the
opposite of the stated goal (to have only one copy of each).
You could add 'extern' to make the linkage external, if what you want is a
single copy of each constant in the whole program. Then you have only the
declarations in your header file, and definitions in an implementation file.
Or to avoid an implementation file you could define inline functions.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?