1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++98, c++03
11 
12 // test move
13 
14 #include <utility>
15 #include <cassert>
16 
17 struct move_only {
move_onlymove_only18     move_only() {}
19     move_only(move_only&&) = default;
20     move_only& operator=(move_only&&) = default;
21 };
22 
source()23 move_only source() {return move_only();}
csource()24 const move_only csource() {return move_only();}
25 
test(move_only)26 void test(move_only) {}
27 
main()28 int main()
29 {
30     move_only a;
31     const move_only ca = move_only();
32 
33     test(std::move(ca)); // c
34 }
35