gcc/testsuite/g++.dg/cpp1z/class-deduction-access3.C
raw| 1 | // { dg-do compile { target c++17 } } |
| 2 | |
| 3 | template<class> |
| 4 | struct Cont; |
| 5 | |
| 6 | template<class T> |
| 7 | class Base |
| 8 | { |
| 9 | using type = T; |
| 10 | friend Cont<T>; |
| 11 | }; |
| 12 | |
| 13 | template<class T> |
| 14 | struct Cont |
| 15 | { |
| 16 | using argument_type = typename Base<T>::type; |
| 17 | Cont(T, argument_type); |
| 18 | }; |
| 19 | |
| 20 | Cont c(1, 1); |