Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/decltype-auto2.C

raw
1 // PR c++/103403
2 // { dg-do compile { target c++14 } }
3
4 template<typename T>
5 auto constexpr RtoL1(T&& r) -> decltype(auto) {
6 return (r);
7 };
8 int main() {
9 int t;
10 int x{3};
11 decltype (RtoL1(x+0)) y = t; // { dg-error "cannot bind rvalue reference" "" { target c++23 } }
12 }