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 // Make sure that a std::vector containing move-only types can't be copied.
10 
11 // UNSUPPORTED: c++03 && !stdlib=libc++
12 
13 #include <vector>
14 
15 #include "MoveOnly.h"
16 
main(int,char **)17 int main(int, char**)
18 {
19     std::vector<MoveOnly> v;
20     std::vector<MoveOnly> copy = v; // expected-error-re@* {{{{(no matching function for call to 'construct_at')|(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
21     return 0;
22 }
23