tmp/tmp94vseilq/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Alias templates <a id="const.iterators.alias">[[const.iterators.alias]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<indirectly_readable It>
|
| 5 |
+
using iter_const_reference_t =
|
| 6 |
+
common_reference_t<const iter_value_t<It>&&, iter_reference_t<It>>;
|
| 7 |
+
|
| 8 |
+
template<class It>
|
| 9 |
+
concept constant-iterator = // exposition only
|
| 10 |
+
input_iterator<It> && same_as<iter_const_reference_t<It>, iter_reference_t<It>>;
|
| 11 |
+
|
| 12 |
+
template<input_iterator I>
|
| 13 |
+
using const_iterator = see below;
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
*Result:* If `I` models `constant-iterator`, `I`. Otherwise,
|
| 17 |
+
`basic_const_iterator<I>`.
|
| 18 |
+
|
| 19 |
+
``` cpp
|
| 20 |
+
template<semiregular S>
|
| 21 |
+
using const_sentinel = see below;
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
*Result:* If `S` models `input_iterator`, `const_iterator<S>`.
|
| 25 |
+
Otherwise, `S`.
|
| 26 |
+
|