aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-12-21 14:39:04 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-12-21 14:39:04 -0500
commit31bfc9b9dd65ecddff3afa690906d94ef7b773da (patch)
tree6a4c3f49466411d75b33e5d43dd222039ad777dd /gcc/cp/cp-tree.h
parent3c75aaa3d884ef2cb1dfed57bb3c2a392ece89d5 (diff)
downloadgcc-31bfc9b9dd65ecddff3afa690906d94ef7b773da.zip
gcc-31bfc9b9dd65ecddff3afa690906d94ef7b773da.tar.gz
gcc-31bfc9b9dd65ecddff3afa690906d94ef7b773da.tar.bz2
Implement P0522R0, matching of template template arguments.
gcc/c-family/ * c.opt (-fnew-ttp-matching): New flag. * c-opts.c (c_common_post_options): Default on if -std=c++1z. gcc/cp/ * pt.c (coerce_template_template_parms): Allow a template argument that's less specialized than the parameter. (unify_bound_ttp_args): Adjust parm's args to apply to arg's template. (coerce_template_args_for_ttp): Split out from lookup_template_class_1. (coerce_ttp_args_for_tta, store_defaulted_ttp) (lookup_defaulted_ttp, add_defaults_to_ttp): New. (process_partial_specialization): Set DECL_CONTEXT of template template-parameters. (coerce_template_parms): Only inform when complain. (expand_template_argument_pack): Handle error_mark_node. (convert_template_argument, template_args_equal, unify): Handle any_targ_node. * cp-tree.h (enum cp_tree_index): Add CPTI_ANY_TARG. (any_targ_node): New. * decl.c (cxx_init_decl_processing): Set it. * name-lookup.c (consider_binding_level): Ignore names with embedded spaces. From-SVN: r243871
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 89bb9b2..ef6265e 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1140,6 +1140,8 @@ enum cp_tree_index
CPTI_ALIGN_TYPE,
+ CPTI_ANY_TARG,
+
CPTI_MAX
};
@@ -1245,6 +1247,9 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
#define keyed_classes cp_global_trees[CPTI_KEYED_CLASSES]
+/* A node which matches any template argument. */
+#define any_targ_node cp_global_trees[CPTI_ANY_TARG]
+
/* Node to indicate default access. This must be distinct from the
access nodes in tree.h. */