tmp/tmp9w19qvaa/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Concept <a id="concept.invocable">[[concept.invocable]]</a>
|
| 2 |
+
|
| 3 |
+
The `invocable` concept specifies a relationship between a callable type
|
| 4 |
+
[[func.def]] `F` and a set of argument types `Args...` which can be
|
| 5 |
+
evaluated by the library function `invoke` [[func.invoke]].
|
| 6 |
+
|
| 7 |
+
``` cpp
|
| 8 |
+
template<class F, class... Args>
|
| 9 |
+
concept invocable = requires(F&& f, Args&&... args) {
|
| 10 |
+
invoke(std::forward<F>(f), std::forward<Args>(args)...); // not required to be equality-preserving
|
| 11 |
+
};
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
[*Example 1*: A function that generates random numbers can model
|
| 15 |
+
`invocable`, since the `invoke` function call expression is not required
|
| 16 |
+
to be equality-preserving [[concepts.equality]]. — *end example*]
|
| 17 |
+
|