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

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-08 
15:48:34 UTC ---
(In reply to comment #6)
> Assuming an implicit instantiation will happen is an incorrect.

... is an incorrect /assumption/  :)

(In reply to comment #7)
> Ok, thanks for clarification. The problem is that I'm not a developer of this
> program, I just maintain its package for Gentoo. To make things worse I can't
> reproduce the build failure myself on any of my hosts. But users continue to
> complain one after another, so this issue needs to be cleared out.

Looking at the preprocessed source I see that the member function template
TStreamerInfo::ReadBuffer is declared in TStreamerInfo.h but only defined in
the .cxx file.  If that function (which is public) is called from a different
.cxx file then it will be implicitly instantiated, which isn't possible if the
definition isn't visible.  The member function template definition should be
moved to the header or there should be an explicit instantiation declaration
(i.e. 'extern template' declaration) in the header and an explicit
instantiation definition in the .cxx file.

Reply via email to