Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2024-12-05 20:06:47


On Thu, Dec 5, 2024 at 5:11 AM Joaquín M López Muñoz via Boost <
boost_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk