|
Boost : |
From: Ivan Matek (libbooze_at_[hidden])
Date: 2024-12-03 13:48:05
On Tue, Dec 3, 2024 at 2:25â¯PM Peter Dimov via Boost <boost_at_[hidden]>
wrote:
>
> I already said this, but let's do it again: the flavor can't be defaulted
> on purpose,
> because you shouldn't be defaulting it, as it's a mistake to do so.
>
> You need to use the flavor passed as an argument, not the default one.
>
>
> I understand that sometimes you are just part of hashing process, same as
sometimes with formatting or parsing you are just part of pipeline.
I wonder if we could have
existing:
template<class Hash, class Flavor>
friend void tag_invoke( boost::hash2::hash_append_tag const&,
Hash& h, Flavor const& f, X const& v )
{
boost::hash2::hash_append(h, f, v.a);
boost::hash2::hash_append(h, f, v.b);
}
and also this:
template<class SimpleHash>
friend void tag_invoke( boost::hash2::simple_hash_append_tag const&,
SimpleHash& h, X const& v )
{
h.append(v.a);
h.append(v.b);
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk