Debian Codegraph @

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

raw
1 // PR c++/104294
2 // { dg-do compile { target c++17 } }
3
4 template<class> struct B;
5
6 template<class R, class... Args>
7 struct B<R(Args...)> {
8 template<class T> struct C { C(T); };
9 C(decltype(nullptr)) -> C<void*>;
10 };
11
12 using ty1 = decltype(B<char(int)>::C{0});
13 using ty1 = B<char(int)>::C<int>;
14
15 using ty2 = decltype(B<char(int)>::C{nullptr});
16 using ty2 = B<char(int)>::C<void*>;