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 #ifndef TEST_SUPPORT_TYPE_CLASSIFICATION_MOVECONSTRUCTIBLE_H
9 #define TEST_SUPPORT_TYPE_CLASSIFICATION_MOVECONSTRUCTIBLE_H
10 
11 struct HasDefaultOps {};
12 
13 struct CustomMoveCtor {
14   CustomMoveCtor(CustomMoveCtor&&) noexcept;
15 };
16 
17 struct MoveOnly {
18   MoveOnly(MoveOnly&&) noexcept = default;
19   MoveOnly& operator=(MoveOnly&&) noexcept = default;
20   MoveOnly(const MoveOnly&) = delete;
21   MoveOnly& operator=(const MoveOnly&) = default;
22 };
23 
24 struct CustomMoveAssign {
25   CustomMoveAssign(CustomMoveAssign&&) noexcept;
26   CustomMoveAssign& operator=(CustomMoveAssign&&) noexcept;
27 };
28 
29 struct DeletedMoveCtor {
30   DeletedMoveCtor(DeletedMoveCtor&&) = delete;
31   DeletedMoveCtor& operator=(DeletedMoveCtor&&) = default;
32 };
33 
34 struct ImplicitlyDeletedMoveCtor {
35   DeletedMoveCtor X;
36 };
37 
38 struct DeletedMoveAssign {
39   DeletedMoveAssign& operator=(DeletedMoveAssign&&) = delete;
40 };
41 
42 struct ImplicitlyDeletedMoveAssign {
43   DeletedMoveAssign X;
44 };
45 
46 class MemberLvalueReference {
47 public:
48   MemberLvalueReference(int&);
49 
50 private:
51   int& X;
52 };
53 
54 class MemberRvalueReference {
55 public:
56   MemberRvalueReference(int&&);
57 
58 private:
59   int&& X;
60 };
61 
62 struct NonMovable {
63   NonMovable() = default;
64   NonMovable(NonMovable&&) = delete;
65   NonMovable& operator=(NonMovable&&) = delete;
66 };
67 
68 struct DerivedFromNonMovable : NonMovable {};
69 
70 struct HasANonMovable {
71   NonMovable X;
72 };
73 
74 #endif // TEST_SUPPORT_TYPE_CLASSIFICATION_MOVECONSTRUCTIBLE_H
75