1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <array>
10 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
11 
12 #include <array>
13 
14 #include "test_macros.h"
15 #include "MoveOnly.h"
16 
17 int main(int, char**) {
18   {
19     char source[3][6] = {"hi", "world"};
20     std::to_array(source); // expected-error {{here}}
21   }
22 
23   {
24     MoveOnly mo[] = {MoveOnly{3}};
25     std::to_array(mo); // expected-error {{here}}
26   }
27 
28   {
29     const MoveOnly cmo[] = {MoveOnly{3}};
30     std::to_array(std::move(cmo)); // expected-error {{here}}
31   }
32 
33   return 0;
34 }
35