Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/pr79143.C

raw
1 // PR c++/79143
2 // { dg-do compile { target c++17 } }
3
4 struct base {
5 base (int, int) {}
6 };
7
8 template<class>
9 struct derived : base {
10 using base::base;
11 };
12
13 template<class>
14 struct derived2 : base {
15 derived2 (int x, int y) : base (x, y) {}
16 };
17
18 int
19 main ()
20 {
21 base (13, 42);
22 derived<int> (13, 42);
23 derived2<int> (13, 42);
24 base{13, 42};
25 derived<int>{13, 42}; // { dg-bogus "too many initializers" }
26 derived2<int>{13, 42};
27 }