2015-12-06 Jason Merrill <jason@redhat.com>
+ * semantics.c (finish_qualified_id_expr): Handle
+ UNBOUND_CLASS_TEMPLATE.
+
* parser.c (cp_parser_template_argument): Handle references in
C++1z mode.
* constexpr.c (potential_constant_expression_1): Don't error about
return error_mark_node;
if (template_p)
- check_template_keyword (expr);
+ {
+ if (TREE_CODE (expr) == UNBOUND_CLASS_TEMPLATE)
+ /* cp_parser_lookup_name thought we were looking for a type,
+ but we're actually looking for a declaration. */
+ expr = build_qualified_name (/*type*/NULL_TREE,
+ TYPE_CONTEXT (expr),
+ TYPE_IDENTIFIER (expr),
+ /*template_p*/true);
+ else
+ check_template_keyword (expr);
+ }
/* If EXPR occurs as the operand of '&', use special handling that
permits a pointer-to-member. */