Commit 34016c81 by Jason Merrill Committed by Jason Merrill

pt.c (resolve_overloaded_unification): New fn.

	* pt.c (resolve_overloaded_unification): New fn.
	(try_one_overload): Likewise.
	(unify): Don't fail on unknown type.
	(type_unification_real): Likewise.  Use resolve_overloaded_unification
	to handle an overloaded argument.
	(template_args_equal): Split out...
	(comp_template_args): From here.
	(determine_specialization): Also allow a template with more
	parms than were explicitly specified.
	* cp-tree.h: Add template_args_equal.
	* call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.

From-SVN: r22951
parent 85ee6037
1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (resolve_overloaded_unification): New fn.
(try_one_overload): Likewise.
(unify): Don't fail on unknown type.
(type_unification_real): Likewise. Use resolve_overloaded_unification
to handle an overloaded argument.
(template_args_equal): Split out...
(comp_template_args): From here.
(determine_specialization): Also allow a template with more
parms than were explicitly specified.
* cp-tree.h: Add template_args_equal.
* call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
* semantics.c (finish_asm_stmt): Revert my 1998-09-28
......
......@@ -2255,26 +2255,6 @@ resolve_args (args)
}
else if (TREE_CODE (TREE_VALUE (t)) == OFFSET_REF)
TREE_VALUE (t) = resolve_offset_ref (TREE_VALUE (t));
else if (TREE_CODE (TREE_VALUE (t)) == TEMPLATE_ID_EXPR)
{
tree targs;
tree r;
r = determine_specialization (TREE_VALUE (t), NULL_TREE,
&targs,
/*need_member_template=*/0,
/*complain=*/0);
/* If we figured out what was being specialized, use it.
Otherwise, the function being called may resolve the
choice of specialization, so we don't issue any error
messages here. */
if (r)
{
r = instantiate_template (r, targs);
TREE_VALUE (t) = r;
}
}
}
return args;
}
......
......@@ -2861,6 +2861,7 @@ extern void pop_tinst_level PROTO((void));
extern int more_specialized_class PROTO((tree, tree));
extern void do_pushlevel PROTO((void));
extern int is_member_template PROTO((tree));
extern int template_parms_equal PROTO((tree, tree));
extern int comp_template_parms PROTO((tree, tree));
extern int decl_template_parm_p PROTO((tree));
extern int template_class_depth PROTO((tree));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment