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++/34996] Base class of explicitly instantiated class doesn't get instantiated


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-29 12:25:00 UTC ---
Derived1::X must be defined in every translation unit that needs it.

An explicit instantiation is *required* to not instantiate members of base
classes:

[temp.explicit]/8

An explicit instantiation that names a class template specialization is also an
explicit instantiation of the same kind (declaration or definition) of each of
its members (not including members inherited from base classes) ...


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