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++/29839] Template static member inherited from template class cannot be initialized



------- Comment #1 from bangerth at dealii dot org  2006-11-15 01:53 -------
There's two problems here: first, you are missing a template<>
in front of your definition. Second, you can't initialize 
static variables with 
  type class::variable();
since this is ambiguous to declaring a function of this name. You
need to write your definition as follows:
  template <> A<C>    B<C>::B_Aobj = A<C>();

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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