gcc/testsuite/g++.dg/cpp1z/auto1.C
raw| 1 | // Verify that deduction failure of the decltype(auto) template parameter is |
| 2 | // a SFINAE error. |
| 3 | // { dg-do compile { target c++17 } } |
| 4 | |
| 5 | template <class> void f(); |
| 6 | template <class> void f(int); |
| 7 | |
| 8 | template <class T = int, decltype(auto) = &f<T>> void g(); |
| 9 | template <class = int> void g(); |
| 10 | |
| 11 | int main() { |
| 12 | g(); |
| 13 | } |