tmp/tmpw5majzsx/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Object concepts <a id="concepts.object">[[concepts.object]]</a>
|
| 2 |
+
|
| 3 |
+
This subclause describes concepts that specify the basis of the
|
| 4 |
+
value-oriented programming style on which the library is based.
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
template<class T>
|
| 8 |
+
concept movable = is_object_v<T> && move_constructible<T> &&
|
| 9 |
+
assignable_from<T&, T> && swappable<T>;
|
| 10 |
+
template<class T>
|
| 11 |
+
concept copyable = copy_constructible<T> && movable<T> && assignable_from<T&, T&> &&
|
| 12 |
+
assignable_from<T&, const T&> && assignable_from<T&, const T>;
|
| 13 |
+
template<class T>
|
| 14 |
+
concept semiregular = copyable<T> && default_initializable<T>;
|
| 15 |
+
template<class T>
|
| 16 |
+
concept regular = semiregular<T> && equality_comparable<T>;
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
[*Note 1*: The `semiregular` concept is modeled by types that behave
|
| 20 |
+
similarly to built-in types like `int`, except that they might not be
|
| 21 |
+
comparable with `==`. — *end note*]
|
| 22 |
+
|
| 23 |
+
[*Note 2*: The `regular` concept is modeled by types that behave
|
| 24 |
+
similarly to built-in types like `int` and that are comparable with
|
| 25 |
+
`==`. — *end note*]
|
| 26 |
+
|