3.1 KiB
[concepts.object]
18 Concepts library [concepts]
18.6 Object concepts [concepts.object]
This subclause describes concepts that specify the basis of the value-oriented programming style on which the library is based.
template<class T> concept [movable](#concept:movable "18.6 Object concepts [concepts.object]") = is_object_v<T> && [move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_constructible [concept.moveconstructible]")<T> && [assignable_from](concept.assignable#concept:assignable_from "18.4.8 Concept assignable_from [concept.assignable]")<T&, T> && [swappable](concept.swappable#concept:swappable "18.4.9 Concept swappable [concept.swappable]")<T>; template<class T> concept [copyable](#concept:copyable "18.6 Object concepts [concepts.object]") = [copy_constructible](concept.copyconstructible#concept:copy_constructible "18.4.14 Concept copy_constructible [concept.copyconstructible]")<T> && [movable](#concept:movable "18.6 Object concepts [concepts.object]")<T> && [assignable_from](concept.assignable#concept:assignable_from "18.4.8 Concept assignable_from [concept.assignable]")<T&, T&> && [assignable_from](concept.assignable#concept:assignable_from "18.4.8 Concept assignable_from [concept.assignable]")<T&, const T&> && [assignable_from](concept.assignable#concept:assignable_from "18.4.8 Concept assignable_from [concept.assignable]")<T&, const T>; template<class T> concept [semiregular](#concept:semiregular "18.6 Object concepts [concepts.object]") = [copyable](#concept:copyable "18.6 Object concepts [concepts.object]")<T> && [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<T>; template<class T> concept [regular](#concept:regular "18.6 Object concepts [concepts.object]") = [semiregular](#concept:semiregular "18.6 Object concepts [concepts.object]")<T> && [equality_comparable](concept.equalitycomparable#concept:equality_comparable "18.5.4 Concept equality_comparable [concept.equalitycomparable]")<T>;
[Note 1:
The semiregular concept is modeled by types that behave similarly to fundamental types like int, except that they need not be comparable with ==.
â end note]
[Note 2:
The regular concept is modeled by types that behave similarly to fundamental types like int and that are comparable with==.
â end note]