c++: Implement P2582R1, CTAD from inherited constructors
[official-gcc.git] / gcc / testsuite / g++.dg / cpp23 / class-deduction-inherited2.C
blobcb3c595f3169cb57fb83a4ee969b8d2b2fc1a18a
1 // { dg-do compile { target c++23 } }
3 template<class T, class U, class V> struct F {
4   F(T, U, V);       // #1
5   F(T*, U*, V*);    // #2
6   template<class W>
7   F(int, int, W);   // #3
8 };
10 F(bool, bool, bool) -> F<bool*, void*, int>;
12 template<class T, class U> struct G : F<U, T, int> {
13   using F<U, T, int>::F;
16 using ty1 = decltype(G(true, 'a', 1)); // uses #1
17 using ty1 = G<char, bool>;
19 using ty2 = decltype(G((bool*)0, (char*)0, (int*)0)); // uses #2
20 using ty2 = G<char, bool>;
22 using ty3 = decltype(G(0, 0, 0)); // uses #3
23 using ty3 = G<int, int>;
25 using ty4 = decltype(G(true, true, true)); // uses #4
26 using ty4 = G<void*, bool*>;