When a class template is explicitly instantiated, its member should be too.
authorMatt Austern <austern@apple.com>
Wed, 2 Jun 2004 21:12:54 +0000 (21:12 +0000)
committerMatt Austern <austern@gcc.gnu.org>
Wed, 2 Jun 2004 21:12:54 +0000 (21:12 +0000)
commit415c974c0bd00f130e7795c3342bad4e3f014c6e
tree3b859606ef88c37bd6602afa96859aa9f1f0cfbe
parentb53dcf3e5c67b345b6dea948cd3a9f4b31ec39a8
When a class template is explicitly instantiated, its member should be too.

* cp-tree.h (instantiate_decl): new boolean parameter,
undefined_ok. Current behavior is equivalent to its being 0.
* decl2.c (mark_used): Add new argument when calling instantiate_decl
* pt.c (mark_decl_instantiated): Unconditionally make
instantiations explicit unconditionally
(do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
since mark_decl_instantiated now does it.
(instantiate_class_member): New.  Instantiate a member of an
explicitly instantiated class template.
(do_type_instantiation): Explicitly instantiate members of an
explicitly instantiated class template.
(instantiate_decl): if undefined_ok is nonzero, and if we're
trying to explicitly instantiated a template with no definition,
change it to an implicit instantiation.
(instantiate_pending_templates): Add new argument to instantiate_decl.
* tree.c (cp_cannot_inline_tree_fn): Likewise.

From-SVN: r82585
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/tree.c