1 // { dg-do compile { target c++14 } }
2 // { dg-options "-fconcepts" }
5 concept bool Destructible() {
9 template <class T, class...Args>
10 concept bool ConstructibleObject =
11 // Concept evaluation should short-circuit even the template
12 // substitution, so we shouldn't even substitute into the requires
13 // constraint and the unimplemented multi-dimensional new T{...}
14 // initialization. ATM we do, but as long as we don't output the
15 // sorry() message we used to for such constructs when asked not
16 // to issue errors, this shouldn't be a problem for this and
18 Destructible<T>() && requires (Args&&...args) {
19 new T{ (Args&&)args... };
24 // GCC has not implemented initialization of multi-dimensional
25 // arrays with new{} expressions.
26 static_assert(!ConstructibleObject<T, T>);