Debian Codegraph @

gcc/testsuite/g++.dg/cpp23/class-deduction-inherited4.C

raw
1 // { dg-do compile { target c++23 } }
2
3 template<class T>
4 struct A { A(T); };
5
6 template<class T>
7 struct B : A<T> {
8 using B::A::A; // FIXME: we don't notice this inherited ctor
9 };
10
11 using ty1 = decltype(B(0)); // { dg-bogus "" "" { xfail *-*-* } }
12 using ty1 = B<int>;
13
14 template<class T=void>
15 struct C : A<int> {
16 using A<int>::A;
17 };
18
19 using ty2 = decltype(C(0));
20 using ty2 = C<void>;
21
22 template<class T>
23 struct D : A<T> {
24 using A<T>::A;
25 };
26
27 using ty3 = decltype(D(0));
28 using ty3 = D<int>;
29
30 A(int) -> A<char>; // FIXME: we need to rebuild the guides of D
31 using ty4 = decltype(D(0));
32 using ty4 = D<char>; // { dg-bogus "conflicting" "" { xfail *-*-* } }