https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86986
Bug ID: 86986 Summary: Unexpected errors for template parameter pack in a template template parameter Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: v.reshetnikov at gmail dot com Target Milestone: --- /************* SOURCE *************/ template<class... T> struct X { template<template<T...> class...> struct Y { }; }; using type = X<int>::Y<>; /*********** END SOURCE ***********/ /************* OUTPUT *************/ <source>: In instantiation of 'struct X<int>': <source>:7:20: required from here <source>:4:12: error: '<template-parameter-1-1>' is not a valid type for a template non-type parameter 4 | struct Y { }; | ^ <source>:4:12: error: '<template-parameter-1-1>' is not a valid type for a template non-type parameter <source>:7:22: error: 'Y' in 'struct X<int>' does not name a template type 7 | using type = X<int>::Y<>; | ^ Compiler returned: 1 /*********** END OUTPUT ***********/ Clang compiles this code successfully