[libcxx] adds concept `std::copy_constructible`
Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
Depends on D96230
Differential Revision: https://reviews.llvm.org/D96232
GitOrigin-RevId: 2193e8be3efa5eea452c6c5bbc2f6393c8f10e62
diff --git a/include/concepts b/include/concepts
index 7ab03ff..e83dce7 100644
--- a/include/concepts
+++ b/include/concepts
@@ -189,6 +189,14 @@
concept move_constructible =
constructible_from<_Tp, _Tp> && convertible_to<_Tp, _Tp>;
+// [concept.copyconstructible]
+template<class _Tp>
+concept copy_constructible =
+ move_constructible<_Tp> &&
+ constructible_from<_Tp, _Tp&> && convertible_to<_Tp&, _Tp> &&
+ constructible_from<_Tp, const _Tp&> && convertible_to<const _Tp&, _Tp> &&
+ constructible_from<_Tp, const _Tp> && convertible_to<const _Tp, _Tp>;
+
#endif //_LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
_LIBCPP_END_NAMESPACE_STD