https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94310

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Potential fix:

--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -16982,6 +16982,15 @@ cp_parser_template_name (cp_parser* parser,

   decl = strip_using_decl (decl);

+  if (TREE_CODE (decl) == USING_DECL
+      && TREE_CODE (USING_DECL_SCOPE (decl)) == TYPE_PACK_EXPANSION)
+    {
+      tree t = PACK_EXPANSION_PATTERN (USING_DECL_SCOPE (decl));
+      t = get_template_info (t);
+      if (t)
+   decl = TI_TEMPLATE (t);
+    }
+
   /* If DECL is a template, then the name was a template-name.  */
   if (TREE_CODE (decl) == TEMPLATE_DECL)
     {

Reply via email to