Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/class-deduction21.C

raw
1 // { dg-do compile { target c++17 } }
2
3 template<class T, class D = int>
4 struct S { T t; };
5 template<class U>
6 S(U) -> S<typename U::type>;
7
8 struct A {
9 using type = short;
10 operator type();
11 };
12 S s{A()}; // OK
13 S x(A()); // { dg-error "return type" }