This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34996] Base class of explicitly instantiated class doesn't get instantiated
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Sep 2011 12:25:00 +0000
- Subject: [Bug c++/34996] Base class of explicitly instantiated class doesn't get instantiated
- Auto-submitted: auto-generated
- References: <bug-34996-4@http.gcc.gnu.org/bugzilla/>
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) ...