https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100459
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- I think that's a desirable change, implemented in r11-2202: commit e7f0873a9c4ebccd078fc5330866efe0cd4c1309 Author: Marek Polacek <pola...@redhat.com> Date: Wed Jul 8 19:45:34 2020 -0400 c++: Diagnose cv-qualified decltype(auto) [PR79815] "If the placeholder is the decltype(auto) type-specifier, T shall be the placeholder alone." but we weren't detecting "const decltype(auto)". I've just expanded the existing diagnostic detecting "decltype(auto) &" and similar. gcc/cp/ChangeLog: PR c++/79815 * decl.c (grokdeclarator): Detect cv-qual decltype(auto). * pt.c (do_auto_deduction): Likewise. gcc/testsuite/ChangeLog: PR c++/79815 * g++.dg/cpp1y/auto-fn59.C: New test.