static struct z_candidate *add_template_candidate_real
(struct z_candidate **, tree, tree, tree, tree, const vec<tree, va_gc> *,
tree, tree, tree, int, tree, unification_kind_t, tsubst_flags_t);
-static struct z_candidate *add_template_conv_candidate
- (struct z_candidate **, tree, tree, tree, const vec<tree, va_gc> *,
- tree, tree, tree, tsubst_flags_t);
static void add_builtin_candidates
(struct z_candidate **, enum tree_code, enum tree_code,
tree, tree *, int, tsubst_flags_t);
(struct z_candidate **, tree, tree, tree, tree *, tree *,
int, tsubst_flags_t);
static struct z_candidate *add_conv_candidate
- (struct z_candidate **, tree, tree, tree, const vec<tree, va_gc> *, tree,
+ (struct z_candidate **, tree, tree, const vec<tree, va_gc> *, tree,
tree, tsubst_flags_t);
static struct z_candidate *add_function_candidate
(struct z_candidate **, tree, tree, tree, const vec<tree, va_gc> *, tree,
static struct z_candidate *
add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj,
- tree first_arg, const vec<tree, va_gc> *arglist,
+ const vec<tree, va_gc> *arglist,
tree access_path, tree conversion_path,
tsubst_flags_t complain)
{
parmlist = TREE_TYPE (parmlist);
parmlist = TYPE_ARG_TYPES (parmlist);
- len = vec_safe_length (arglist) + (first_arg != NULL_TREE ? 1 : 0) + 1;
+ len = vec_safe_length (arglist) + 1;
convs = alloc_conversions (len);
parmnode = parmlist;
viable = 1;
if (i == 0)
arg = obj;
- else if (i == 1 && first_arg != NULL_TREE)
- arg = first_arg;
else
- arg = (*arglist)[i - (first_arg != NULL_TREE ? 1 : 0) - 1];
+ arg = (*arglist)[i - 1];
argtype = lvalue_type (arg);
if (i == 0)
reason = arity_rejection (NULL_TREE, i + remaining, len);
}
- return add_candidate (candidates, totype, first_arg, arglist, len, convs,
+ return add_candidate (candidates, totype, obj, arglist, len, convs,
access_path, conversion_path, viable, reason, flags);
}
if (obj != NULL_TREE)
/* Aha, this is a conversion function. */
- cand = add_conv_candidate (candidates, fn, obj, first_arg, arglist,
+ cand = add_conv_candidate (candidates, fn, obj, arglist,
access_path, conversion_path, complain);
else
cand = add_function_candidate (candidates, fn, ctype,
static struct z_candidate *
add_template_conv_candidate (struct z_candidate **candidates, tree tmpl,
- tree obj, tree first_arg,
+ tree obj,
const vec<tree, va_gc> *arglist,
tree return_type, tree access_path,
tree conversion_path, tsubst_flags_t complain)
{
return
add_template_candidate_real (candidates, tmpl, NULL_TREE, NULL_TREE,
- first_arg, arglist, return_type, access_path,
+ NULL_TREE, arglist, return_type, access_path,
conversion_path, 0, obj, DEDUCE_CONV,
complain);
}
if (TREE_CODE (fn) == TEMPLATE_DECL)
add_template_conv_candidate
- (&candidates, fn, obj, NULL_TREE, *args, totype,
+ (&candidates, fn, obj, *args, totype,
/*access_path=*/NULL_TREE,
/*conversion_path=*/NULL_TREE, complain);
else
- add_conv_candidate (&candidates, fn, obj, NULL_TREE,
+ add_conv_candidate (&candidates, fn, obj,
*args, /*conversion_path=*/NULL_TREE,
/*access_path=*/NULL_TREE, complain);
}