https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100482
--- Comment #1 from Jeremy R. <sand at rifkin dot dev> --- This appears to be valid for function return types as well but the compiler does error when decltype is used in a function parameter namespace std{} int A(int a) { // fine decltype(std) b = a; return b; } decltype(std) B(int a) { // fine decltype(std) b = a; return b; } auto C(int a) -> decltype(std) { // fine decltype(std) b = a; return b; } int D(decltype(std) a) { // error: expected initializer before 'a' decltype(std) b = a; return b; }