aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/pr79143.C
blob: 9d57a1abdebb9e76ff9394b72e7be1fe6d8dfd51 (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
26
27
// PR c++/79143
// { dg-do compile { target c++17 } }

struct base {
  base (int, int) {}
};

template<class>
struct derived : base {
  using base::base;
};

template<class>
struct derived2 : base {
  derived2 (int x, int y) : base (x, y) {}
};

int
main ()
{
  base (13, 42);
  derived<int> (13, 42);
  derived2<int> (13, 42);
  base{13, 42};
  derived<int>{13, 42}; // { dg-bogus "too many initializers" }
  derived2<int>{13, 42};
}