Home | History | Annotate | Download | only in cp

Lines Matching defs:targs

2159   tree targs;
2224 targs = coerce_template_parms (parms, explicit_targs, fns,
2227 if (targs != error_mark_node
2228 && constraints_satisfied_p (fns, targs))
2229 templates = tree_cons (targs, fns, templates);
2353 targs = get_bindings (fn, decl, explicit_targs, /*check_ret=*/true);
2356 if (!targs)
2361 if (uses_template_parms (targs))
2367 templates = tree_cons (targs, fn, templates);
3001 tree targs = NULL_TREE;
3130 &targs,
3162 int arg_depth = TMPL_ARGS_DEPTH (targs);
3170 be too many levels of TARGS. Remove some of them
3178 = TREE_VEC_ELT (targs, i);
3179 targs = new_targs;
3182 return instantiate_template (tmpl, targs, tf_error);
3214 return register_specialization (tmpl, gen_tmpl, targs,
3219 DECL_TEMPLATE_INFO (decl) = build_template_info (tmpl, targs);
3311 decl = register_specialization (decl, gen_tmpl, targs,
4721 /* any_template_parm_r expects to be able to get the targs of a
7986 unify_bound_ttp_args (tree tparms, tree targs, tree parm, tree& arg,
8004 if (unify (tparms, targs, nparmvec, argvec,
8012 && unify_pack_expansion (tparms, targs, parmvec, argvec,
8045 if (unify (tparms, targs,
8052 && unify_pack_expansion (tparms, targs,
8147 tree targs = make_tree_vec (nargs);
8149 if (!unify (arg_parms, targs, aargs, pargs, UNIFY_ALLOW_NONE,
8229 /* Verifies that the deduced template arguments (in TARGS) for the
8238 template_template_parm_bindings_ok_p (tree tparms, tree targs)
8246 targs = INNERMOST_TEMPLATE_ARGS (targs);
8251 tree targ = TREE_VEC_ELT (targs, i);
8294 targs))
9657 TREE_VALUE (ret) = targs;
9659 targs = NULL;
10456 TARGS template args, and instantiate it if it's not dependent. */
10459 lookup_and_finish_template_variable (tree templ, tree targs,
10462 templ = lookup_template_variable (templ, targs);
10463 if (!any_dependent_template_arguments_p (targs))
11108 push_tinst_level_loc (tree tldcl, tree targs, location_t loc)
11126 if (!targs && limit_bad_template_recursion (tldcl))
11136 if (!quiet_flag && !targs
11143 new_level->targs = targs;
11937 /* The template TMPL is being instantiated with the template arguments TARGS.
11941 perform_instantiation_time_access_checks (tree tmpl, tree targs)
11958 type_scope = tsubst (type_scope, targs, tf_error, NULL_TREE);
17572 tree targs = TREE_OPERAND (t, 1);
17575 if (targs)
17576 targs = tsubst_template_args (targs, args, complain, in_decl);
17579 return lookup_template_variable (tmpl, targs);
17581 return lookup_template_function (tmpl, targs);
20043 fold_targs_r (tree targs, tsubst_flags_t complain)
20045 int len = TREE_VEC_LENGTH (targs);
20048 tree &elt = TREE_VEC_ELT (targs, i);
20089 tree targs = TREE_OPERAND (fn, 1);
20090 if (targs == NULL_TREE)
20092 if (targs == error_mark_node)
20094 return fold_targs_r (targs, complain);
20142 "F<TARGS> (ARGS)". */
20228 tree targs = TREE_OPERAND (t, 1);
20230 if (targs)
20231 targs = tsubst_template_args (targs, args, complain, in_decl);
20232 if (targs == error_mark_node)
20238 tree tid = lookup_template_function (name, targs);
20245 tree check = build_concept_check (templ, targs, complain);
20261 tree r = lookup_and_finish_template_variable (templ, targs,
20275 tree tid = lookup_template_function (templ, targs);
22056 it. TARGS is a vector into which the deduced template arguments
22090 tree targs,
22119 tree full_targs = targs;
22120 if (TMPL_ARGS_DEPTH (targs)
22124 targs));
22254 /* Place the explicitly specified arguments in TARGS. */
22257 TREE_VEC_ELT (targs, i) = TREE_VEC_ELT (explicit_targs, i);
22259 && !NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs))
22261 (targs, NUM_TMPL_ARGS (explicit_targs));
22301 if (!explain_p && !push_tinst_level (fn, targs))
22337 (DECL_INNERMOST_TEMPLATE_PARMS (fn), targs))
22346 if (!constraints_satisfied_p (fn, targs))
22349 diagnose_constraints (DECL_SOURCE_LOCATION (fn), fn, targs);
22370 if (!push_tinst_level (fn, targs))
22379 decl = instantiate_template (fn, targs, complain);
22402 if (strict == DEDUCE_EXACT && !any_dependent_template_arguments_p (targs))
22432 decl = instantiate_template (orig_fn, targs, complain);
22773 unify_one_argument (tree tparms, tree targs, tree parm, tree arg,
22836 resolve_overloaded_unification (tparms, targs, parm,
22861 return unify (tparms, targs, parm, arg, arg_strict, explain_p);
22880 tree &targs = d->value;
22889 unify (tparms, targs, TREE_TYPE (max), size_type_node,
22903 try_array_deduction (tree tparms, tree targs, tree parm)
22905 tree_pair_s data = { tparms, targs };
22944 tree targs = INNERMOST_TEMPLATE_ARGS (full_targs);
22947 in TARGS. */
22948 NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs) = NULL_TREE;
23047 tree targ = TREE_VEC_ELT (targs, i);
23065 try_array_deduction (tparms, targs, xparms);
23067 if (TREE_VEC_ELT (targs, i))
23112 TREE_VEC_ELT (targs, i) = arg;
23125 tree targ = TREE_VEC_ELT (targs, i);
23208 TREE_VEC_ELT (targs, i) = arg;
23210 is also the number of non-defaulted arguments in TARGS.
23212 if (!NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs))
23213 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs, i);
23221 if (CHECKING_P && !NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs))
23222 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs, TREE_VEC_LENGTH (targs));
23230 only one succeeds, we go with that. Modifies TARGS and returns
23235 tree targs,
23242 tree tempargs = copy_node (targs);
23307 if (try_one_overload (tparms, targs, tempargs, parm,
23334 if (try_one_overload (tparms, targs, tempargs, parm, TREE_TYPE (fn),
23353 int i = TREE_VEC_LENGTH (targs);
23357 tree old = TREE_VEC_ELT (targs, i);
23364 TREE_VEC_ELT (targs, i) = new_;
23494 overload. Fills TARGS with any deduced arguments, or error_mark_node if
23504 tree targs,
23541 nargs = TREE_VEC_LENGTH (targs);
23593 TREE_VEC_ELT (targs, i) = elt;
23602 TARGS are as for unify. */
23605 try_class_unification (tree tparms, tree targs, tree parm, tree arg,
23619 unify. If we used TARGS, we'd clutter it up with the result of
23648 copy_of_targs = make_tree_vec (TREE_VEC_LENGTH (targs));
23673 targs, tree parm, tree arg,
23693 tree r = try_class_unification (tparms, targs, parm,
23826 unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
23837 targs = add_to_template_args (PACK_EXPANSION_EXTRA_ARGS (parm), targs);
23838 int levels = TMPL_ARGS_DEPTH (targs);
23864 packs = tree_cons (parm_pack, TMPL_ARG (targs, level, idx), packs);
23893 TMPL_ARG (targs, level, idx) = arg;
23903 dependent = any_dependent_template_arguments_p (targs);
23906 parm = tsubst (pattern, targs,
23918 if (unify_one_argument (tparms, targs, parm, arg, subr, strict,
23929 TMPL_ARG (targs, level, idx);
23948 TMPL_ARG (targs, level, idx) = old_pack;
23984 TMPL_ARG (targs, level, idx) = result;
24030 unify_array_domain (tree tparms, tree targs,
24087 return unify (tparms, targs, parm_max, arg_max,
24111 set of template parameters to a template. TARGS is the bindings
24112 for those template parameters, as determined thus far; TARGS may
24117 consistent with the existing assignments in TARGS. If more values
24118 are deduced, then TARGS is updated.
24152 unify (tree tparms, tree targs, tree parm, tree arg, int strict,
24240 RECUR_AND_CHECK_FAILURE (tparms, targs, elttype, elt, elt_strict,
24252 return unify_array_domain (tparms, targs, TYPE_DOMAIN (parm),
24261 targ = TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx);
24263 TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx) = targ;
24327 targ = TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx);
24345 tree t = try_class_unification (tparms, targs, parm, arg,
24351 r = get_template_base (tparms, targs, parm, arg,
24365 if (unify_bound_ttp_args (tparms, targs, parm, arg, explain_p))
24439 TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx) = arg;
24460 targ = TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx);
24484 if (TEMPLATE_PARM_LEVEL (parm) > TMPL_ARGS_DEPTH (targs))
24490 tparm = tsubst (tparm, targs, tf_none, NULL_TREE);
24496 complain, adc_unify, targs,
24526 && TEMPLATE_PARM_LEVEL (parm) <= TMPL_ARGS_DEPTH (targs))
24531 RECUR_AND_CHECK_FAILURE (tparms, targs,
24537 tparm = tsubst (TREE_TYPE (parm), targs, tf_none, NULL_TREE);
24559 TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx) = arg;
24579 return unify (tparms, targs, PTRMEM_CST_MEMBER (parm),
24603 return unify (tparms, targs, TREE_TYPE (parm),
24610 targs, TREE_TYPE (parm), TREE_TYPE (arg),
24619 RECUR_AND_CHECK_FAILURE (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
24622 return unify_array_domain (tparms, targs, TYPE_DOMAIN (parm),
24701 RECUR_AND_CHECK_FAILURE (tparms, targs,
24707 return unify_pack_expansion (tparms, targs, parm, arg,
24723 return unify (tparms, targs,
24738 t = try_class_unification (tparms, targs,
24753 r = get_template_base (tparms, targs, parm, arg,
24779 return unify (tparms, targs, CLASSTYPE_TI_ARGS (parm),
24813 RECUR_AND_CHECK_FAILURE (tparms, targs, TREE_TYPE (parm),
24824 if (type_unification_real (tparms, targs, TYPE_ARG_TYPES (parm),
24837 RECUR_AND_CHECK_FAILURE (tparms, targs, TREE_PURPOSE (pspec),
24856 RECUR_AND_CHECK_FAILURE (tparms, targs, TYPE_OFFSET_BASETYPE (parm),
24863 return unify (tparms, targs, TREE_TYPE (parm), fntype, strict, explain_p);
24868 RECUR_AND_CHECK_FAILURE (tparms, targs, TYPE_OFFSET_BASETYPE (parm),
24871 return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
24876 return unify (tparms, targs, DECL_INITIAL (parm), arg, strict, explain_p);
24904 return unify (tparms, targs, ARGUMENT_PACK_ARGS (parm),
24928 return unify (tparms, targs, TREE_OPERAND (parm, 0), arg,
25048 /* Subroutine of more_specialized_fn: check whether TARGS is missing any
25055 check_undeduced_parms (tree targs, tree args, tree end)
25059 for (i = TREE_VEC_LENGTH (targs) - 1; i >= 0; --i)
25060 if (TREE_VEC_ELT (targs, i) == NULL_TREE)
25063 TREE_VEC_ELT (targs, i) = error_mark_node;
25067 tree substed = tsubst_arg_types (args, targs, end, tf_none, NULL_TREE);
25386 tree targs;
25400 targs = get_partial_spec_bindings (tmpl, tmpl1, specargs2);
25401 if (targs)
25407 targs = get_partial_spec_bindings (tmpl, tmpl2, specargs1);
25408 if (targs)
25458 tree targs = make_tree_vec (ntparms);
25478 if (fn_type_unification (fn, explicit_args, targs,
25488 return targs;
29451 tree targs, unsigned targs_index, tsubst_flags_t complain)
29455 targs, complain);
29459 targs, complain, NULL_TREE);
29463 targs, complain, NULL_TREE);
29464 int depth = TMPL_ARGS_DEPTH (targs);
29465 TMPL_ARG (targs, depth, targs_index) = template_parm_to_arg (list);
29478 tree tparms, targs, fparms, fargs, ci;
29508 targs = INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (type));
29532 targs = get_innermost_template_args (DECL_TI_ARGS (ctor),
29554 gcc_assert (TMPL_ARGS_DEPTH (targs) == depth);
29559 tree tsubst_args = copy_node (targs);
29595 targs = template_parms_to_args (tparms);
29622 fparms = tsubst_arg_types (fparms, targs, NULL_TREE, complain, ctor);
29623 fargs = tsubst (fargs, targs, complain, ctor);
29629 ci = tsubst_constraint_info (ci, targs, complain, ctor);
29655 DECL_TEMPLATE_INFO (ded_fn) = build_template_info (ded_tmpl, targs);
29722 tree targs = make_tree_vec (TREE_VEC_LENGTH (tparms));
29723 int err = unify (tparms, targs, type, etype,
29725 ggc_free (targs);
29912 tree targs = make_tree_vec (len);
29913 int err = unify (ftparms, targs, ret, utype, UNIFY_ALLOW_NONE, false);
29922 if (TREE_VEC_ELT (targs, i) == NULL_TREE)
29936 if (TREE_VEC_ELT (targs, i) == NULL_TREE)
29943 targs, i, complain);
29956 g = tsubst_decl (DECL_TEMPLATE_RESULT (f), targs, complain);
29971 ci = tsubst_constraint_info (ci, targs, complain, in_decl);
29996 tree targs = make_tree_vec (natparms);
29997 int err = unify (atparms, targs, utype, ret, UNIFY_ALLOW_NONE, false);
29999 if (TREE_VEC_ELT (targs, i) == NULL_TREE)
30453 tree targs;
30461 targs = make_tree_vec (1);
30462 TREE_VEC_ELT (targs, 0) = TREE_TYPE (init);
30482 targs = make_tree_vec (1);
30483 TREE_VEC_ELT (targs, 0) = deduced;
30502 targs = make_tree_vec (TREE_VEC_LENGTH (tparms));
30503 int val = type_unification_real (tparms, targs, parms, &init, 1, 0,
30525 type_unification_real (tparms, targs, parms, &init, 1, 0,
30572 full_targs = add_to_template_args (full_targs, targs);
30625 targs = add_to_template_args (outer_targs, targs);
30627 targs = add_to_template_args (current_template_args (), targs);
30628 return tsubst (type, targs, complain, NULL_TREE);
30652 tree targs = add_outermost_template_args (current_template_args (),
30658 tsubst_constraint (TREE_VALUE (ci), targs,
30661 return tsubst (type, targs, tf_none, NULL_TREE);