Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/auto-fn59.C

raw
1 // PR c++/79815
2 // { dg-do compile { target c++14 } }
3
4 decltype(auto) const x = 1; // { dg-error "cannot be cv-qualified" }
5 volatile decltype(auto) x2 = 1; // { dg-error "cannot be cv-qualified" }
6 const volatile decltype(auto) x3 = 1; // { dg-error "cannot be cv-qualified" }
7 const decltype(auto) fn() { return 42; } // { dg-error "cannot be cv-qualified" }
8 const decltype(auto) fn2(); // { dg-error "cannot be cv-qualified" }