Debian Codegraph @

libstdc++-v3/testsuite/20_util/specialized_algorithms/construct_at/array_neg.cc

raw
1 // { dg-do compile { target c++20 } }
2
3 // LWG 3436. std::construct_at should support arrays
4
5 #include <memory>
6
7 void
8 test_array_args()
9 {
10 int arr[2];
11 std::construct_at(&arr, 1, 2); // { dg-error "here" }
12 // { dg-error "must not use any arguments" "" { target *-*-* } 0 }
13 }
14
15 void
16 test_unbounded_array(int (*p)[])
17 {
18 std::construct_at(p); // { dg-error "no matching function" }
19 }