c++: Allow standard attributes after closing square bracket in new-type-id [PR110345]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / pr79143.C
blob9d57a1abdebb9e76ff9394b72e7be1fe6d8dfd51
1 // PR c++/79143
2 // { dg-do compile { target c++17 } }
4 struct base {
5   base (int, int) {}
6 };
8 template<class>
9 struct derived : base {
10   using base::base;
13 template<class>
14 struct derived2 : base {
15   derived2 (int x, int y) : base (x, y) {}
18 int
19 main ()
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};