[Bug c++/14404] static const integral member cannot be passed as const reference
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Wed Mar 3 09:52:00 GMT 2004
------- Additional Comments From pcarlini at suse dot de 2004-03-03 09:52 -------
Not a bug. We are talking about a static member, therefore, in general, you
initialize it outside the class definition:
struct Foo { static const unsigned value; };
const unsigned Foo::value = 1024;
Alternately, for integral types, you can *initialize* within the class body:
struct Foo { static const unsigned value = 1024; };
const unsigned Foo::value;
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14404
More information about the Gcc-bugs
mailing list