]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp1z/pr79143.C
invoke.texi: Document -std=c++17 and -std=gnu++17 and document c++1z and gnu++1z...
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp1z / pr79143.C
1 // PR c++/79143
2 // { dg-do compile }
3 // { dg-options "-std=c++17" }
4
5 struct base {
6 base (int, int) {}
7 };
8
9 template<class>
10 struct derived : base {
11 using base::base;
12 };
13
14 template<class>
15 struct derived2 : base {
16 derived2 (int x, int y) : base (x, y) {}
17 };
18
19 int
20 main ()
21 {
22 base (13, 42);
23 derived<int> (13, 42);
24 derived2<int> (13, 42);
25 base{13, 42};
26 derived<int>{13, 42}; // { dg-bogus "too many initializers" }
27 derived2<int>{13, 42};
28 }