[libcxx] adds concept std::movable
Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
Depends on D97162
Reviewed By: EricWF, #libc, Quuxplusone
Differential Revision: https://reviews.llvm.org/D97359
GitOrigin-RevId: dc9f385722245858a2d5160d5764158195e3751e
diff --git a/include/concepts b/include/concepts
index 4f97387..696f353 100644
--- a/include/concepts
+++ b/include/concepts
@@ -366,6 +366,14 @@
const remove_reference_t<_Up>&>> &&
__weakly_equality_comparable_with<_Tp, _Up>;
+// [concepts.object]
+template<class _Tp>
+concept movable =
+ is_object_v<_Tp> &&
+ move_constructible<_Tp> &&
+ assignable_from<_Tp&, _Tp> &&
+ swappable<_Tp>;
+
// [concept.invocable]
template<class _Fn, class... _Args>
concept invocable = requires(_Fn&& __fn, _Args&&... __args) {