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++/25260] [4.0/4.1/4.2 Regression] Forward explicit intantiation declaration doesn't mix well with static integral member



------- Comment #2 from mmitchel at gcc dot gnu dot org  2005-12-19 19:12 -------
This is not valid code; the error message is correct.  You asked for an
instantiation of the entire class, which includes the static data member. 
There is no definition of the static data member available.

You must write:

  template <class T>
  static const unsigned int A<T>::n;

to define the static data member, even though there is an in-class
initialization.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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


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