Thanks Andrew. Yes, standard actually mentions this that I missed.
- fariborz
On Mar 11, 2005, at 11:25 AM, Andrew Pinski wrote:
On Mar 11, 2005, at 2:16 PM, Fariborz Jahanian wrote:
So, is g++ correct in rejecting this seemingly good user code?
Yes you need a place to store the data.
So for an example in your original testcase, you need:
const int Foo::foo;
Which fixes the problem and yes 9.4.2 explains this (I cannot find it
right
now but I know there has been multiple bugs about this in the past).
-- Pinski