diff --git a/libs/util/include/psemek/util/hash.hpp b/libs/util/include/psemek/util/hash.hpp index 349a7b0b..701d93a4 100644 --- a/libs/util/include/psemek/util/hash.hpp +++ b/libs/util/include/psemek/util/hash.hpp @@ -16,6 +16,15 @@ namespace psemek::util seed = b * k; } + template ())>>> + void hash_sequence(std::size_t & seed, Iterator begin, Iterator end, Hash hash = Hash{}) + { + for (; begin != end; ++begin) + { + hash_combine(seed, hash(*begin)); + } + } + struct any_hash { struct is_transparent{};