tmp/tmptyf1794t/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Class template `take_view::sentinel` <a id="range.take.sentinel">[[range.take.sentinel]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::ranges {
|
| 5 |
+
template<view V>
|
| 6 |
+
template<bool Const>
|
| 7 |
+
class take_view<V>::sentinel {
|
| 8 |
+
private:
|
| 9 |
+
using Base = conditional_t<Const, const V, V>; // exposition only
|
| 10 |
+
using CI = counted_iterator<iterator_t<Base>>; // exposition only
|
| 11 |
+
sentinel_t<Base> end_ = sentinel_t<Base>(); // exposition only
|
| 12 |
+
public:
|
| 13 |
+
sentinel() = default;
|
| 14 |
+
constexpr explicit sentinel(sentinel_t<Base> end);
|
| 15 |
+
constexpr sentinel(sentinel<!Const> s)
|
| 16 |
+
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
|
| 17 |
+
|
| 18 |
+
constexpr sentinel_t<Base> base() const;
|
| 19 |
+
|
| 20 |
+
friend constexpr bool operator==(const CI& y, const sentinel& x);
|
| 21 |
+
};
|
| 22 |
+
}
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
constexpr explicit sentinel(sentinel_t<Base> end);
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
*Effects:* Initializes *end\_* with `end`.
|
| 30 |
+
|
| 31 |
+
``` cpp
|
| 32 |
+
constexpr sentinel(sentinel<!Const> s)
|
| 33 |
+
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
*Effects:* Initializes *end\_* with `std::move(s.`*`end_`*`)`.
|
| 37 |
+
|
| 38 |
+
``` cpp
|
| 39 |
+
constexpr sentinel_t<Base> base() const;
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
*Effects:* Equivalent to: `return `*`end_`*`;`
|
| 43 |
+
|
| 44 |
+
``` cpp
|
| 45 |
+
friend constexpr bool operator==(const CI& y, const sentinel& x);
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
*Effects:* Equivalent to:
|
| 49 |
+
`return y.count() == 0 || y.base() == x.`*`end_`*`;`
|
| 50 |
+
|