[Bug c++/29839] Template static member inherited from template class cannot be initialized

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Wed Nov 15 01:53:00 GMT 2006



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



More information about the Gcc-bugs mailing list