aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction106.C
blob: b4c4d262f44cf08153108b853e7ee0205138a200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/104294
// { dg-do compile { target c++17 } }

template<class> struct B;

template<class R, class... Args>
struct B<R(Args...)> {
  template<class T> struct C { C(T); };
  C(decltype(nullptr)) -> C<void*>;
};

using ty1 = decltype(B<char(int)>::C{0});
using ty1 = B<char(int)>::C<int>;

using ty2 = decltype(B<char(int)>::C{nullptr});
using ty2 = B<char(int)>::C<void*>;