
Alexander Grund wrote:
If the hash-algorithms would accept `span<const void>` (or <const char>) instead as the only `update` method (no need for overloads) we could have
hash_append( span{v} ); hash_append( span{st} );
by accepting a templated span and casting it to the span-type expected by the hash-algorithms. And/or a `hash2::span` that accepts any range-like in the ctor and doing the cast.
Yes, obviously.
However, there's an additional concern here that people perhaps don't
appreciate. The hash algorithm requirements govern user-defined algorithms
as well. N3980 wasn't supposed to be a library of hash algorithms; it was
supposed to be a framework into which any user-defined hash algorithm
can plug into, and be used for hashing C++ objects.
That's why the hash algorithm interface is kept minimal and uncomplicated
(which is at odds with making it as ergonomic as possible.)
I can obviously support any form of `update` by making it templated and do
the appropriate enable_if incantations, but I don't want to impose this
requirement on hash algorithm authors.
And I don't want to force hash algorithm authors to have to include