tmp/tmpuj_txes1/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Class template `projected` <a id="projected">[[projected]]</a>
|
| 2 |
+
|
| 3 |
+
Class template `projected` is used to constrain algorithms that accept
|
| 4 |
+
callable objects and projections [[defns.projection]]. It combines a
|
| 5 |
+
`indirectly_readable` type `I` and a callable object type `Proj` into a
|
| 6 |
+
new `indirectly_readable` type whose `reference` type is the result of
|
| 7 |
+
applying `Proj` to the `iter_reference_t` of `I`.
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
namespace std {
|
| 11 |
+
template<indirectly_readable I, indirectly_regular_unary_invocable<I> Proj>
|
| 12 |
+
struct projected {
|
| 13 |
+
using value_type = remove_cvref_t<indirect_result_t<Proj&, I>>;
|
| 14 |
+
indirect_result_t<Proj&, I> operator*() const; // not defined
|
| 15 |
+
};
|
| 16 |
+
|
| 17 |
+
template<weakly_incrementable I, class Proj>
|
| 18 |
+
struct incrementable_traits<projected<I, Proj>> {
|
| 19 |
+
using difference_type = iter_difference_t<I>;
|
| 20 |
+
};
|
| 21 |
+
}
|
| 22 |
+
```
|
| 23 |
+
|