aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited5.C
blob: d835acb0b797337cd43b02191f8962293f7b8754 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// PR c++/116276
// { dg-do compile { target c++20 } }

template<class T>
struct Base1 { };

template<class T>
struct Base2 { };

template<class T = int>
struct Derived : public Base1<T>, Base2<T> {
  using Base1<T>::Base1;
  using Base2<T>::Base2;
};

Derived d;

template<class T = int>
struct Derived2 : public Base1<T>, Base2<T> {
  using Base1<T>::Base1::Base1;
  using Base2<T>::Base2::Base2;
  Derived2();
};

Derived2 d2;