aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-11-26 16:58:38 -0500
committerJason Merrill <jason@gcc.gnu.org>2014-11-26 16:58:38 -0500
commita2033ab1071bd77d1bde659c9b1a0f00e85cc6bf (patch)
tree5545278ced316fbb528d4e891ecfe7d300975c53 /gcc/cp/cp-tree.h
parentd896cc4d45203f639fe95c7c3af14ad3f2d26673 (diff)
downloadgcc-a2033ab1071bd77d1bde659c9b1a0f00e85cc6bf.zip
gcc-a2033ab1071bd77d1bde659c9b1a0f00e85cc6bf.tar.gz
gcc-a2033ab1071bd77d1bde659c9b1a0f00e85cc6bf.tar.bz2
Allow partial specialization of variable templates.
* cp-tree.h (TINFO_USED_TEMPLATE_ID): New. * decl.c (duplicate_decls): Copy it. * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables. * parser.c (cp_parser_decltype_expr): Do call finish_id_expression on template-ids. * pt.c (register_specialization): Remember variable template insts. (instantiate_template_1): Find the matching partial specialization. (check_explicit_specialization): Allow variable partial specialization. (process_partial_specialization): Likewise. (push_template_decl_real): Likewise. (more_specialized_partial_spec): Rename from more_specialized_class. (most_specialized_partial_spec): Rename from most_specialized_class. (get_partial_spec_bindings): Rename from get_class_bindings. From-SVN: r218104
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index f1064e9..edd1d5d 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -99,6 +99,7 @@ c-common.h, not after.
QUALIFIED_NAME_IS_TEMPLATE (in SCOPE_REF)
DECLTYPE_FOR_INIT_CAPTURE (in DECLTYPE_TYPE)
CONSTRUCTOR_NO_IMPLICIT_ZERO (in CONSTRUCTOR)
+ TINFO_USED_TEMPLATE_ID (in TEMPLATE_INFO)
2: IDENTIFIER_OPNAME_P (in IDENTIFIER_NODE)
ICS_THIS_FLAG (in _CONV)
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (in VAR_DECL)
@@ -801,6 +802,12 @@ typedef struct qualified_typedef_usage_s qualified_typedef_usage_t;
#define FNDECL_HAS_ACCESS_ERRORS(NODE) \
(TINFO_HAS_ACCESS_ERRORS (DECL_TEMPLATE_INFO (NODE)))
+/* Non-zero if this variable template specialization was specified using a
+ template-id, so it's a partial or full specialization and not a definition
+ of the member template of a particular class specialization. */
+#define TINFO_USED_TEMPLATE_ID(NODE) \
+ (TREE_LANG_FLAG_1 (TEMPLATE_INFO_CHECK (NODE)))
+
struct GTY(()) tree_template_info {
struct tree_common common;
vec<qualified_typedef_usage_t, va_gc> *typedefs_needing_access_checking;