https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88095
Jeff Snyder <jeff-gcc at caffeinated dot me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeff-gcc at caffeinated dot me.uk --- Comment #1 from Jeff Snyder <jeff-gcc at caffeinated dot me.uk> --- I had a go at fixing this, and the following makes Hana's example work: -------------------8<------------------- --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -27875,7 +27875,8 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, { tree parm_list = TREE_VEC_ELT (parameter_list, 0); tree parm = INNERMOST_TEMPLATE_PARMS (parm_list); - if (CLASS_TYPE_P (TREE_TYPE (parm))) + if (CLASS_TYPE_P (TREE_TYPE (parm)) + || TREE_CODE (TREE_TYPE (parm)) == TEMPLATE_TYPE_PARM) /* OK, C++20 string literal operator template. We don't need to warn in lower dialects here because we will have already warned about the template parameter. */; ------------------->8-------------------