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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2003 15:24:02 -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
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at codesourcery dot
| |com
------- Additional Comments From bangerth at dealii dot org 2003-08-11 15:24 -------
FWIW: icc rejects the code on the same grounds if run in strict more (-Xc -ansi). One
of the reasons I can think of is that if an exception is raised somewhere in the
constructor of B, then the member ptr<A> may have to be destroyed again, for which
we need the destructor of ptr<A>. So it does somehow make sense to require that
it can be compiled. This view is supported by the observation that the code compiles
fine if you give -fno-exceptions.
I don't know any normative statement in the standard to support my point of view, though.
Nathan, do you?
W.