https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95657
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks fixed in GCC 11: <source>:1:1: error: 'decltype(auto)' type specifier only available with '-std=c++14' or '-std=gnu++14' 1 | decltype (auto) foo( decltype (auto) a ){ } | ^~~~~~~~ <source>:1:22: error: 'decltype(auto)' type specifier only available with '-std=c++14' or '-std=gnu++14' 1 | decltype (auto) foo( decltype (auto) a ){ } | ^~~~~~~~ <source>:1:38: error: expected initializer before 'a' 1 | decltype (auto) foo( decltype (auto) a ){ } | ^