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++/10634] in-class initialization of static data members no longer allowed


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-11 10:21:05 UTC ---
C++0x supports the desired functionality with 'constexpr'

struct Struct {
  static constexpr unsigned char * pointer = (unsigned char*)0x123;
};

I think this enhancement request should be closed, because it's unlikely that
'constexpr' will be made available in c++98 mode and it's even less likely that
an incompatible non-standard extension will be added


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