
5 Dec
2024
5 Dec
'24
4:11 p.m.
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