On Tue, Nov 30, 2010 at 9:07 AM, Miles Bader <mi...@gnu.org> wrote: >> If people are worried about multiple translation units, they >> will still have to provide a definition outside the class -- most >> likely > > Why?
Because its address may be silently taken (through binding to references), therefore a definition is needed. > Certainly as in my experience, that's not true. That is extra-ordinary, not the norm. > > In C++ "static const" is a way of defining constants, and the fact > that integral class "constants" were allowed whereas floating-point > class "constants" were not was just a wart. This misfeature of in-class initialization is a 15-year old debate. I doubt, it will be resolved on GCC development list.