
5 Dec
2024
5 Dec
'24
4:08 p.m.
On Thu, Dec 5, 2024 at 7:31 AM Peter Dimov via Boost
Alexander Grund wrote:
So span<void const> then or as that isn't accepted span<char const> assuming sizeof(char)==sizeof(byte)
span<void const> doesn't exist, though. I was giving it as an example of something that I would have added to the hypothetical hash2::span, but no existing span library has it.
If we limit ourselves to std::span, I suppose we can just add three (or four) overloads, one per byte type.
(Four because of char8_t.)
This part confuses me. It's always safe to cast to void const *; what not just have a single template that takes a std::span<T>, and cast it's .begin() and .end() to void const *? Zach