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

Reply via email to