
On Fri, Dec 6, 2024 at 11:56 PM Vinnie Falco
On Fri, Dec 6, 2024 at 2:42 PM Ivan Matek via Boost
wrote: I was looking into if this could be wrapped into a nicer interface, that is harder to misuse.
There could be merit here, and first we should identify who the users are. These are the categories of "users" of Hash2:
1. Authors of a hash_append overload for a user-defined type 2. Authors of a HashAlgorithm 3. Authors of a Hash (the C++ named requirement described in https://en.cppreference.com/w/cpp/named_req/Hash) 4. Authors of a foreign hash concept (something like a QHash or absl::Hash)
Hi Vinnie, I was not able to fully follow this categorization, could you tell me under which category is the following example? https://pdimov.github.io/hash2/doc/html/hash2.html#example_md5sum
Those are the usecases which I was "targeting" with hard to misuse wrapper since I presume: - if library was successful those kind of uses will be most common - knowledge of preconditions to use library of average end users is lower on average than those of library implementers(here talking about both Hash2 library and some other library that uses Hash2 framework to add new hash).