Closed ThePhD closed 5 years ago
Related to Review span in face of p1024 and p1089 (Continued from #14).
It's so due to span
's history (see e.g. p0122r1).
Currently, cppreference says:
inline constexpr std::size_t dynamic_extent = std::numeric_limits<std::size_t>::max();
(since C++20)
and:
Since std::size_t
is an unsigned type, an equivalent definition is:
inline constexpr std::size_t dynamic_extent = -1;
So it seems like a good idea to change extent_t
to be std::size_t
.
I'll try and update span lite in this respect.
I updated it for you. Let me know if anything is wrong. :D
Thanks @ThePhD,
In the end the changes you offered in PR #46 were handled in 54ae6bac45e7c6afe2996e9877ff7ead214a8c61, 9becd6980fa74c3f39e95d2dee472d4573b91d56 (extent) and in 0c95c2994823a2ee43c2b476af2ac5e74ab4fff1 (index_type
-> size_type
) and 17abefb0ad0c9c02df3e243fecca62462c941a7b (change default type to std::size_t
).
Yaaay! 🎉
Thanks for doing this so quickly. It certainly covers all of my use cases. I appreciate it! ❤️
Hi, thank you for this project! I would be grateful if we could see this change in a new release.
Released v0.7.0.
I wrote a template
This didn't work properly, because
extent_t
inspan-lite
isptrdiff_t
. Can I change this tostd::size_t
and make a PR, or is there a specific reason span-lite made this choice?