PR modula2/115112 Incorrect line debugging information occurs during INC builtin
[gcc.git] / libstdc++-v3 / testsuite / 23_containers / array / creation / 115522.cc
blob37073e002bdb3c064f83c81d312a030ee9b32eb6
1 // { dg-do compile { target c++20 } }
3 // PR libstdc++/115522 std::to_array no longer works for struct which is
4 // trivial but not default constructible
6 #include <array>
8 void
9 test_deleted_ctor()
11 struct S
13 S() = delete;
14 S(int) { }
17 S arr[1] = {{1}};
18 auto arr1 = std::to_array(arr);
19 auto arr2 = std::to_array(std::move(arr));
22 void
23 test_deleted_assignment()
25 struct S
27 void operator=(const S&) = delete;
30 S arr[1] = {};
31 auto a1 = std::to_array(arr);
32 auto a2 = std::to_array(std::move(arr));