tmp/tmpxb9cse9f/{from.md → to.md}
RENAMED
|
@@ -67,10 +67,13 @@ namespace std::ranges {
|
|
| 67 |
constexpr outer-iterator begin();
|
| 68 |
constexpr default_sentinel_t end() const noexcept;
|
| 69 |
|
| 70 |
constexpr auto size() requires sized_range<V>;
|
| 71 |
constexpr auto size() const requires sized_range<const V>;
|
|
|
|
|
|
|
|
|
|
| 72 |
};
|
| 73 |
|
| 74 |
template<class R>
|
| 75 |
chunk_view(R&&, range_difference_t<R>) -> chunk_view<views::all_t<R>>;
|
| 76 |
}
|
|
@@ -112,10 +115,22 @@ constexpr auto size() const requires sized_range<const V>;
|
|
| 112 |
|
| 113 |
``` cpp
|
| 114 |
return to-unsigned-like(div-ceil(ranges::distance(base_), n_));
|
| 115 |
```
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
#### Class `chunk_view::outer-iterator` <a id="range.chunk.outer.iter">[[range.chunk.outer.iter]]</a>
|
| 118 |
|
| 119 |
``` cpp
|
| 120 |
namespace std::ranges {
|
| 121 |
template<view V>
|
|
@@ -231,10 +246,12 @@ namespace std::ranges {
|
|
| 231 |
constexpr inner-iterator begin() const noexcept;
|
| 232 |
constexpr default_sentinel_t end() const noexcept;
|
| 233 |
|
| 234 |
constexpr auto size() const
|
| 235 |
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
|
|
|
|
|
|
|
| 236 |
};
|
| 237 |
}
|
| 238 |
```
|
| 239 |
|
| 240 |
``` cpp
|
|
@@ -265,10 +282,20 @@ constexpr auto size() const
|
|
| 265 |
``` cpp
|
| 266 |
return to-unsigned-like(ranges::min(parent_->remainder_,
|
| 267 |
ranges::end(parent_->base_) - *parent_->current_));
|
| 268 |
```
|
| 269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
#### Class `chunk_view::inner-iterator` <a id="range.chunk.inner.iter">[[range.chunk.inner.iter]]</a>
|
| 271 |
|
| 272 |
``` cpp
|
| 273 |
namespace std::ranges {
|
| 274 |
template<view V>
|
|
@@ -443,10 +470,13 @@ namespace std::ranges {
|
|
| 443 |
}
|
| 444 |
}
|
| 445 |
|
| 446 |
constexpr auto size() requires sized_range<V>;
|
| 447 |
constexpr auto size() const requires sized_range<const V>;
|
|
|
|
|
|
|
|
|
|
| 448 |
};
|
| 449 |
}
|
| 450 |
```
|
| 451 |
|
| 452 |
``` cpp
|
|
@@ -467,10 +497,22 @@ constexpr auto size() const requires sized_range<const V>;
|
|
| 467 |
|
| 468 |
``` cpp
|
| 469 |
return to-unsigned-like(div-ceil(ranges::distance(base_), n_));
|
| 470 |
```
|
| 471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 472 |
#### Class template `chunk_view::iterator` for forward ranges <a id="range.chunk.fwd.iter">[[range.chunk.fwd.iter]]</a>
|
| 473 |
|
| 474 |
``` cpp
|
| 475 |
namespace std::ranges {
|
| 476 |
template<view V>
|
|
|
|
| 67 |
constexpr outer-iterator begin();
|
| 68 |
constexpr default_sentinel_t end() const noexcept;
|
| 69 |
|
| 70 |
constexpr auto size() requires sized_range<V>;
|
| 71 |
constexpr auto size() const requires sized_range<const V>;
|
| 72 |
+
|
| 73 |
+
constexpr auto reserve_hint() requires approximately_sized_range<V>;
|
| 74 |
+
constexpr auto reserve_hint() const requires approximately_sized_range<const V>;
|
| 75 |
};
|
| 76 |
|
| 77 |
template<class R>
|
| 78 |
chunk_view(R&&, range_difference_t<R>) -> chunk_view<views::all_t<R>>;
|
| 79 |
}
|
|
|
|
| 115 |
|
| 116 |
``` cpp
|
| 117 |
return to-unsigned-like(div-ceil(ranges::distance(base_), n_));
|
| 118 |
```
|
| 119 |
|
| 120 |
+
``` cpp
|
| 121 |
+
constexpr auto reserve_hint() requires approximately_sized_range<V>;
|
| 122 |
+
constexpr auto reserve_hint() const requires approximately_sized_range<const V>;
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
*Effects:* Equivalent to:
|
| 126 |
+
|
| 127 |
+
``` cpp
|
| 128 |
+
auto s = static_cast<range_difference_t<decltype((base_))>>(ranges::reserve_hint(base_));
|
| 129 |
+
return to-unsigned-like(div-ceil(s, n_));
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
#### Class `chunk_view::outer-iterator` <a id="range.chunk.outer.iter">[[range.chunk.outer.iter]]</a>
|
| 133 |
|
| 134 |
``` cpp
|
| 135 |
namespace std::ranges {
|
| 136 |
template<view V>
|
|
|
|
| 246 |
constexpr inner-iterator begin() const noexcept;
|
| 247 |
constexpr default_sentinel_t end() const noexcept;
|
| 248 |
|
| 249 |
constexpr auto size() const
|
| 250 |
requires sized_sentinel_for<sentinel_t<V>, iterator_t<V>>;
|
| 251 |
+
|
| 252 |
+
constexpr auto reserve_hint() const noexcept;
|
| 253 |
};
|
| 254 |
}
|
| 255 |
```
|
| 256 |
|
| 257 |
``` cpp
|
|
|
|
| 282 |
``` cpp
|
| 283 |
return to-unsigned-like(ranges::min(parent_->remainder_,
|
| 284 |
ranges::end(parent_->base_) - *parent_->current_));
|
| 285 |
```
|
| 286 |
|
| 287 |
+
``` cpp
|
| 288 |
+
constexpr auto reserve_hint() const noexcept;
|
| 289 |
+
```
|
| 290 |
+
|
| 291 |
+
*Effects:* Equivalent to:
|
| 292 |
+
|
| 293 |
+
``` cpp
|
| 294 |
+
return to-unsigned-like(parent_->remainder_);
|
| 295 |
+
```
|
| 296 |
+
|
| 297 |
#### Class `chunk_view::inner-iterator` <a id="range.chunk.inner.iter">[[range.chunk.inner.iter]]</a>
|
| 298 |
|
| 299 |
``` cpp
|
| 300 |
namespace std::ranges {
|
| 301 |
template<view V>
|
|
|
|
| 470 |
}
|
| 471 |
}
|
| 472 |
|
| 473 |
constexpr auto size() requires sized_range<V>;
|
| 474 |
constexpr auto size() const requires sized_range<const V>;
|
| 475 |
+
|
| 476 |
+
constexpr auto reserve_hint() requires approximately_sized_range<V>;
|
| 477 |
+
constexpr auto reserve_hint() const requires approximately_sized_range<const V>;
|
| 478 |
};
|
| 479 |
}
|
| 480 |
```
|
| 481 |
|
| 482 |
``` cpp
|
|
|
|
| 497 |
|
| 498 |
``` cpp
|
| 499 |
return to-unsigned-like(div-ceil(ranges::distance(base_), n_));
|
| 500 |
```
|
| 501 |
|
| 502 |
+
``` cpp
|
| 503 |
+
constexpr auto reserve_hint() requires approximately_sized_range<V>;
|
| 504 |
+
constexpr auto reserve_hint() const requires approximately_sized_range<const V>;
|
| 505 |
+
```
|
| 506 |
+
|
| 507 |
+
*Effects:* Equivalent to:
|
| 508 |
+
|
| 509 |
+
``` cpp
|
| 510 |
+
auto s = static_cast<range_difference_t<decltype((base_))>>(ranges::reserve_hint(base_));
|
| 511 |
+
return to-unsigned-like(div-ceil(s, n_));
|
| 512 |
+
```
|
| 513 |
+
|
| 514 |
#### Class template `chunk_view::iterator` for forward ranges <a id="range.chunk.fwd.iter">[[range.chunk.fwd.iter]]</a>
|
| 515 |
|
| 516 |
``` cpp
|
| 517 |
namespace std::ranges {
|
| 518 |
template<view V>
|