Niels Lohmann
f7b068eff6
Extend the bulk scan fast paths to sized sentinels
...
supports_bulk_scan required IteratorType and SentinelType to be the same
type, which excluded std::counted_iterator paired with std::default_sentinel_t
- the combination #5268 had already enabled for the memcpy fast path. Such
input fell back to the byte-at-a-time scanner even though it is contiguous
and its remaining length is computable in O(1).
Factor the "distance is computable in O(1)" test into sentinel_is_sized and
use it for iterator_is_contiguous, supports_seek, and supports_bulk_scan
alike, and share the std::ranges::distance/std::distance dispatch through a
remaining_count() helper.
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-08-31 23:25:02 +02:00
..
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-07-11 15:09:28 +02:00
2026-07-31 18:04:30 +02:00
2026-07-08 16:40:58 +02:00
2026-07-09 20:18:28 +02:00
2026-07-09 06:44:51 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-25 07:16:10 +01:00
2026-07-31 08:33:07 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-19 20:19:47 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-31 23:25:02 +02:00
2026-01-01 20:00:39 +01:00
2026-08-03 19:13:31 +02:00
2026-08-12 09:21:19 +02:00
2026-01-01 20:00:39 +01:00
2026-07-09 20:38:39 +02:00
2026-01-01 20:00:39 +01:00
2026-07-08 20:25:13 +02:00
2026-07-12 09:16:25 +02:00
2026-01-01 20:00:39 +01:00
2026-08-03 08:35:53 +02:00
2026-01-01 20:00:39 +01:00
2026-08-05 16:01:23 +02:00
2026-05-22 14:14:11 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-07-02 06:35:35 +02:00
2026-07-02 15:59:36 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-07-09 20:38:39 +02:00
2026-01-01 20:00:39 +01:00
2026-07-01 06:47:24 +02:00
2026-05-13 07:59:16 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-28 13:38:28 +01:00
2026-07-11 15:09:28 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-05-14 15:39:18 +02:00
2026-05-18 20:33:47 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-28 13:38:28 +01:00
2026-06-16 22:05:44 +02:00
2026-07-02 15:59:36 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-03 08:35:53 +02:00
2026-08-25 07:16:10 +01:00
2026-01-01 20:00:39 +01:00
2026-05-16 10:04:22 +02:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-01-01 20:00:39 +01:00
2026-08-31 23:25:02 +02:00
2026-01-01 20:00:39 +01:00
2026-08-05 13:43:36 +02:00
2026-01-01 20:00:39 +01:00