1 // { dg-do compile { target c++14 } }
2 // { dg-options "-fconcepts" }
3 
4 template <class T>
Destructible()5 concept bool Destructible() {
6     return false;
7 }
8 
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
17     // similar cases.
requires(Args &&...args)18     Destructible<T>() && requires (Args&&...args) {
19         new T{ (Args&&)args... };
20     };
21 
main()22 int main() {
23     using T = int[2][2];
24     // GCC has not implemented initialization of multi-dimensional
25     // arrays with new{} expressions.
26     static_assert(!ConstructibleObject<T, T>);
27 }
28