gcc/testsuite/g++.dg/cpp1y/auto-fn35.C
raw| 1 | // PR c++/77790 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template < typename S > struct A |
| 5 | { |
| 6 | // { dg-error "" "" { target c++11_only } .+1 } |
| 7 | template < typename T > static auto f () { return 0; } |
| 8 | template < class U = decltype (f < S > ()) > int g () { return 0; } |
| 9 | }; |
| 10 | |
| 11 | auto a = A < int > {}.g (); |