PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / auto-fn21.C
blob4db1c86c8d90432abd76ce1938c249067297ab17
1 // N3638: decltype(auto) must stand alone
2 // { dg-do compile { target c++14 } }
4 void f();
5 decltype(auto) g1() { return &f; }
6 decltype(auto)* g2() { return f; } // { dg-error "decltype.auto" }