gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr10.C
raw| 1 | // PR c++/97034 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | namespace N { |
| 5 | template <typename, typename> struct S { |
| 6 | template <typename T, typename U> S(T, U); |
| 7 | }; |
| 8 | } // namespace N |
| 9 | template <int I> struct E { |
| 10 | template<typename U> struct M { |
| 11 | template <typename T> struct G { T t; }; |
| 12 | void fn() { G{N::S<char, int>{'a', 1}}; } |
| 13 | }; |
| 14 | }; |
| 15 | |
| 16 | void |
| 17 | g () |
| 18 | { |
| 19 | E<1>::M<int> m; |
| 20 | m.fn (); |
| 21 | } |