Boost logo

Boost :

From: Rainer Deyke (rdeyke_at_[hidden])
Date: 2024-12-07 13:22:05


On 06.12.24 17:32, Andrey Semashev via Boost wrote:
> On 12/6/24 18:54, Julien Blanc via Boost wrote:

>> X x;
>> std::fnv1a_64 h;
>> boost::hash2::hash_append(h, {}, x); // works, with no changes to X
>>
>> Notice the namespace is still boost::hash2. I expect it to work whatever std::fnv1a_64
>> finally chose as its interface.
>
> Sure, but why use boost::hash2::hash_append when there's, presumably,
> std::hash_append, since you've already switched to std::fnv1a_64?

Because in generic code you wouldn't know if your hash algorithm is
supplied by std or boost::hash2.

-- 
Rainer Deyke - rainerd_at_[hidden]

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