[Bug c++/37972] static variables of template class not emitted if no initializer given

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 31 11:38:00 GMT 2008



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-10-31 11:36 -------
Because you instantiate Base<int> which is not a specialization yet.  Then
you define foo for a specialization which is not instantiated.  You want

template <typename T>
int Base<T>::foo;


-- 


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



More information about the Gcc-bugs mailing list