This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14404] static const integral member cannot be passed as const reference


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]