50 lines
3.1 KiB
Markdown
50 lines
3.1 KiB
Markdown
[concepts.object]
|
||
|
||
# 18 Concepts library [[concepts]](./#concepts)
|
||
|
||
## 18.6 Object concepts [concepts.object]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L1172)
|
||
|
||
This subclause describes concepts that specify the basis of the
|
||
value-oriented programming style on which the library is based[.](#1.sentence-1)
|
||
|
||
[ð](#itemdecl:1)
|
||
|
||
`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>;
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L1190)
|
||
|
||
[*Note [1](#note-1)*:
|
||
|
||
The [semiregular](#concept:semiregular "18.6 Object concepts [concepts.object]") concept is modeled by types that behave similarly
|
||
to fundamental types like int, except that they need not
|
||
be comparable with ==[.](#2.sentence-1)
|
||
|
||
â *end note*]
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L1197)
|
||
|
||
[*Note [2](#note-2)*:
|
||
|
||
The [regular](#concept:regular "18.6 Object concepts [concepts.object]") concept is modeled by types that behave similarly to
|
||
fundamental types like int and that are comparable with==[.](#3.sentence-1)
|
||
|
||
â *end note*]
|