Debian Codegraph @

gcc/testsuite/g++.dg/expr/anew7.C

raw
1 // PR c++/115645
2 // { dg-do compile { target c++11 } }
3
4 struct S {
5 explicit S() { }
6 };
7
8 auto p = new S[1][1]();
9 auto q = new S[1][1]{}; // { dg-error "explicit" }
10 auto r = new S[1]();
11 auto s = new S[1]{}; // { dg-error "explicit" }
12 auto t = new S[1][1][1]();
13 auto u = new S[1][1][1]{}; // { dg-error "explicit" }