This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22263] explicit instantiation fails to emit symbols defined later
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2005 00:06:43 -0000
- Subject: [Bug c++/22263] explicit instantiation fails to emit symbols defined later
- References: <20050630231800.22263.sebor@roguewave.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From sebor at roguewave dot com 2005-07-01 00:06 -------
Further, in response to comment 2 from bug 22263:
I agree that 14.7.2, p3 applies to that case but since the definition of class b
is in scope at the point of the explicit instantiation of the class template I
believe the test case is well-formed. The definition of a class template doesn't
necessarily imply the definition of all its members, just their declaration.
I don't see any practical difference between either of these cases and the case
of explicitly instantiating a non-member function template which need only be
declared but not necessarily defined at the point of the explicit instantiation.
As an additional data point, the behavior implemented by all other compilers is
to instantiate all members regardless of whether they are defined prior or after
the directive.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22263