https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91309
Bug ID: 91309 Summary: Fails to compile when initializing template argument with immediately-invoked lambda Product: gcc Version: 9.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: beachboy44 at me dot com Target Milestone: --- https://godbolt.org/z/8O-ItF The following code fails to compile: template<int> struct S {}; template<int> using T = S< []{ return 0; }() >; template<int i> using U = T<i>; using V = U<0>; error: 'U' does not name a type However, it compiles when you specify an integer literal as the template argument to T: template<int> using U = T<0>;