
5 Dec
2024
5 Dec
'24
8:06 p.m.
On Thu, Dec 5, 2024 at 5:11 AM Joaquín M López Muñoz via Boost < boost@lists.boost.org> wrote:
You can define the interface of update as accepting a templatized arg with span-like semantics.
This could work. Instead of writing: h.update( span ); You instead write: boost::hash2::update( h, span ); The signatures for update can be conditionally compiled based on C++ version, availability of boost::span, or it could be a function template based on a span-like concept. Hasher's update signature would remain as ( void const*, std::size_t ). Authors of hash algorithms would not need to include a span header or add additional signatures. Thanks to Matt Borland for helping me work this out. Regards