In my Test class, there is a member of the const static subtype. Usually I define this member const static as follows.
class Test { public: class Dummy {}; private: static Dummy const dummy; }; Test::Dummy const Test::dummy;
When compiling this source with gcc-4.6, it gives no errors and compiles correctly.
When compiling the same source with gcc-4.4, it gives the following error: error: uninitialized const 'Test::dummy' on the marked line.
- Is there any other way to define this variable static const?
- Is this a limitation of gcc-4.4?
- Is there a workaround?
Didier trosset
source share