Commit 3b3ba9f0 by Jason Merrill Committed by Jason Merrill

call.c, [...]: Remove nsubsts parm from *type_unification* and unify.

	* call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
	*type_unification* and unify.

From-SVN: r18377
parent d9f1e3da
Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
* call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
*type_unification* and unify.
Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
* parse.y (explicit_template_type): Remove TEMPLATE keyword.
......
......@@ -2849,7 +2849,7 @@ build_overload_call_real (fnname, parms, flags, final_cp, require_complete)
i = type_unification (DECL_INNERMOST_TEMPLATE_PARMS (function),
&TREE_VEC_ELT (targs, 0),
TYPE_ARG_TYPES (TREE_TYPE (function)),
parms, NULL_TREE, &template_cost, 0, 0);
parms, NULL_TREE, 0, 0);
if (i == 0)
{
function = instantiate_template (function, targs);
......
......@@ -5167,12 +5167,11 @@ instantiate_type (lhstype, rhs, complain)
{
int n = DECL_NTPARMS (elem);
tree t = make_scratch_vec (n);
int i, d = 0;
int i;
i = type_unification
(DECL_INNERMOST_TEMPLATE_PARMS (elem),
&TREE_VEC_ELT (t, 0), TYPE_ARG_TYPES (TREE_TYPE (elem)),
TYPE_ARG_TYPES (lhstype), explicit_targs, &d,
1, 1);
TYPE_ARG_TYPES (lhstype), explicit_targs, 1, 1);
if (i == 0)
{
if (save_elem)
......@@ -5183,7 +5182,7 @@ instantiate_type (lhstype, rhs, complain)
save_elem = instantiate_template (elem, t);
/* Check the return type. */
if (! comptypes (TREE_TYPE (lhstype),
TREE_TYPE (TREE_TYPE (save_elem)), 1))
TREE_TYPE (TREE_TYPE (t)), 1))
save_elem = 0;
}
}
......
......@@ -2442,7 +2442,7 @@ extern tree instantiate_class_template PROTO((tree));
extern tree instantiate_template PROTO((tree, tree));
extern void overload_template_name PROTO((tree));
extern int fn_type_unification PROTO((tree, tree, tree, tree, tree, int, tree));
extern int type_unification PROTO((tree, tree *, tree, tree, tree, int *, int, int));
extern int type_unification PROTO((tree, tree *, tree, tree, tree, int, int));
struct tinst_level *tinst_for_decl PROTO((void));
extern void mark_decl_instantiated PROTO((tree, int));
extern int more_specialized PROTO((tree, tree, 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