https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116888
Bug ID: 116888 Summary: Incorrect lazy substitution into unevaluated context Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mizvekov at gmail dot com Target Milestone: --- GCC misses diagnosing this invalid call when the outer template is instantiated: https://godbolt.org/z/jxTWY9x6z template <class T> void d() {} template <class T> struct Test1 { template <class U, class = void> struct Helper {}; template <class U> struct Helper<U, decltype(d<T>(1))>; }; template struct Test1<int>; GCC accepts this, while every other implementation rejects.