https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103401
Bug ID: 103401 Summary: gcc accepts decltype(auto(0)) as the parameter of the function Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- It seems that gcc should not accept this strange syntax, although I don't know why f has two template parameters.. void f(decltype(auto(0))) { } int main() { f<int,int>(0); } https://godbolt.org/z/PaevrsrE8