Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
+ * pt.c (add_to_template_args): Fix thinko.
+ (instantiate_class_template): Call it later.
+
* pt.c (get_class_bindings): Add outer_args parm.
(most_specialized_class): Likewise.
(instantiate_class_template): Pass it.
{
int i;
- new_args = make_tree_vec (TREE_VEC_LENGTH (args) - 1);
+ new_args = make_tree_vec (TREE_VEC_LENGTH (args) + 1);
for (i = 0; i < TREE_VEC_LENGTH (args); ++i)
TREE_VEC_ELT (new_args, i) = TREE_VEC_ELT (args, i);
}
}
+ /* FIXME avoid duplication. */
mangled_name = mangle_class_name_for_template (IDENTIFIER_POINTER (d1),
parmlist,
arglist,
args = get_class_bindings (TREE_VALUE (t), TREE_PURPOSE (t),
args, outer_args);
- if (outer_args)
- args = add_to_template_args (outer_args, args);
-
if (pedantic && uses_template_parms (args))
/* If there are still template parameters amongst the args, then
we can't instantiate the type; there's no telling whether or not one
maybe_push_to_top_level (uses_template_parms (type));
pushclass (type, 0);
+ if (outer_args)
+ args = add_to_template_args (outer_args, args);
+
if (flag_external_templates)
{
if (flag_alt_external_templates)