Boost logo

Boost :

From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2024-12-05 16:11:21


5 décembre 2024 à 12:52 "Peter Dimov via Boost" a écrit:
>
> I can obviously support any form of `update` by making it templated and do
> the appropriate enable_if incantations, but I don't want to impose this
> requirement on hash algorithm authors.

Can't it be fully done inside hash_append instead, without requiring the hash
update itself being template?

In c++20, it's pretty trivial to invoke a callable object with the correct
set of arguments (see https://godbolt.org/z/KhP5bcM3d for the kind of things
i'm thinking of). Of course it makes the Hash concept pretty hard to define,
as it's kinda polymorphic…

I don't remember how doable it is with C++11, just pretty sure that it will be
a lot more painful.

Regards,

Julien


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