https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85011
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- EDG and MSVC reject it too. They all accept it if the definition says decltype(x), matching the declaration. I think the bug is in GCC's diagnostic printing, which doesn't show the signature as it was written in the source.