Created on 2024-12-13.00:00:00 last changed 1 week ago
There exist range types `R` whose size is representable by neither `ptrdiff_t` nor make-signed-like-t<ranges::range_size_t<R>>, specifically `views::iota(size_t(0), size_t(-1))`. It's unfortunate that `std::ssize` and `ranges::ssize` produce a negative size for such ranges even when their difference type is capable of representing their size (see demo). Perhaps the `ssize` overloads should return static_cast<common_type_t<ptrdiff_t, iter_difference_t<decltype(meow.begin())>>>(meow.size()) instead when the argument meow models `range`?
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-12-13 00:00:00 | admin | create |