------- Comment #5 from bangerth at dealii dot org 2008-03-31 19:54 ------- (In reply to comment #0) > The following stripped down code shows pure virtual method definitions for > both > a normal base class and a templated base class. To my surprise, the templated > class' body is not generated,
Your example code contains neither a call to TBase<int>::pvMethod (which would trigger an implicit instantiation of this function from its template) nor an explicit instantiation of either the entire class or of this function. Consequently, the compiler doesn't instantiate your template. If you intend to call TBase<int>::pvMethod from somewhere where the definition of this template is not visible, you need to add an explicit instantiation of this function for 'int' as the template arg. W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org Status|NEW |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33878