This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11880] [regression] implicit template instantiation instantiate unused class methods
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2003 15:39:52 -0000
- Subject: [Bug c++/11880] [regression] implicit template instantiation instantiate unused class methods
- References: <20030811101922.11880.casteyde.christian@free.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11880
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From nathan at gcc dot gnu dot org 2003-08-11 15:39 -------
your analysis is correct, B::B requires the ctors & dtors of its members to be
instantiated.[14.7.1]/2 says 'the function template specialization
is imlicitly instantiated when the specialization is referenced in a context that
requires that function definition to exist.' B::B requires ptr<A>::~ptr to exist.