1*24dd2d2fSChristopher Di Bella //===----------------------------------------------------------------------===//
2*24dd2d2fSChristopher Di Bella //
3*24dd2d2fSChristopher Di Bella // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*24dd2d2fSChristopher Di Bella // See https://llvm.org/LICENSE.txt for license information.
5*24dd2d2fSChristopher Di Bella // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*24dd2d2fSChristopher Di Bella //
7*24dd2d2fSChristopher Di Bella //===----------------------------------------------------------------------===//
8*24dd2d2fSChristopher Di Bella 
9*24dd2d2fSChristopher Di Bella // UNSUPPORTED: c++03, c++11, c++14, c++17
10*24dd2d2fSChristopher Di Bella 
11*24dd2d2fSChristopher Di Bella // template<class T>
12*24dd2d2fSChristopher Di Bella // concept move_constructible;
13*24dd2d2fSChristopher Di Bella 
14*24dd2d2fSChristopher Di Bella #include <concepts>
15*24dd2d2fSChristopher Di Bella #include <type_traits>
16*24dd2d2fSChristopher Di Bella 
17*24dd2d2fSChristopher Di Bella #include "type_classification/moveconstructible.h"
18*24dd2d2fSChristopher Di Bella 
19*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int>);
20*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int*>);
21*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int&>);
22*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int&&>);
23*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const int>);
24*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const int&>);
25*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const int&&>);
26*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile int>);
27*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile int&>);
28*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile int&&>);
29*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int (*)()>);
30*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int (&)()>);
31*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<HasDefaultOps>);
32*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<CustomMoveCtor>);
33*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<MoveOnly>);
34*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const CustomMoveCtor&>);
35*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile CustomMoveCtor&>);
36*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const CustomMoveCtor&&>);
37*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile CustomMoveCtor&&>);
38*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<CustomMoveAssign>);
39*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const CustomMoveAssign&>);
40*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile CustomMoveAssign&>);
41*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const CustomMoveAssign&&>);
42*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<volatile CustomMoveAssign&&>);
43*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<int HasDefaultOps::*>);
44*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<void (HasDefaultOps::*)(int)>);
45*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<MemberLvalueReference>);
46*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<MemberRvalueReference>);
47*24dd2d2fSChristopher Di Bella 
48*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<void>);
49*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<const CustomMoveCtor>);
50*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<volatile CustomMoveCtor>);
51*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<const CustomMoveAssign>);
52*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<volatile CustomMoveAssign>);
53*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<int[10]>);
54*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<DeletedMoveCtor>);
55*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<ImplicitlyDeletedMoveCtor>);
56*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<DeletedMoveAssign>);
57*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<ImplicitlyDeletedMoveAssign>);
58*24dd2d2fSChristopher Di Bella 
59*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<DeletedMoveCtor&>);
60*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<DeletedMoveCtor&&>);
61*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const DeletedMoveCtor&>);
62*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const DeletedMoveCtor&&>);
63*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<ImplicitlyDeletedMoveCtor&>);
64*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<ImplicitlyDeletedMoveCtor&&>);
65*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const ImplicitlyDeletedMoveCtor&>);
66*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const ImplicitlyDeletedMoveCtor&&>);
67*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<DeletedMoveAssign&>);
68*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<DeletedMoveAssign&&>);
69*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const DeletedMoveAssign&>);
70*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const DeletedMoveAssign&&>);
71*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<ImplicitlyDeletedMoveAssign&>);
72*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<ImplicitlyDeletedMoveAssign&&>);
73*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const ImplicitlyDeletedMoveAssign&>);
74*24dd2d2fSChristopher Di Bella static_assert(std::move_constructible<const ImplicitlyDeletedMoveAssign&&>);
75*24dd2d2fSChristopher Di Bella 
76*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<NonMovable>);
77*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<DerivedFromNonMovable>);
78*24dd2d2fSChristopher Di Bella static_assert(!std::move_constructible<HasANonMovable>);
79