gcc/testsuite/g++.dg/cpp1z/class-deduction91.C
raw| 1 | // PR c++/101174 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | |
| 4 | struct S { using type = int; }; |
| 5 | |
| 6 | template<class T = int, class U = S> |
| 7 | struct multiset { |
| 8 | using type = typename U::type; |
| 9 | multiset(T); |
| 10 | multiset(U); |
| 11 | }; |
| 12 | |
| 13 | template<class T> |
| 14 | multiset(T) -> multiset<T>; |
| 15 | |
| 16 | multiset c(42); |