diff --git a/hash.hpp b/hash.hpp index 6f4d52f3..99e10af8 100644 --- a/hash.hpp +++ b/hash.hpp @@ -3,11 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2010-2015, Danny Robson + * Copyright 2010-2019, Danny Robson */ -#ifndef __UTIL_HASH_HPP -#define __UTIL_HASH_HPP +#pragma once #include "hash/murmur/murmur2.hpp" @@ -27,6 +26,18 @@ namespace cruft::hash { { return murmur2::mix (a, b); } -} -#endif + + template + constexpr ValueT + mix (ValueT &&head, ValueT &&tail, ArgsT&&...args) + { + return mix ( + mix ( + std::forward (head), + std::forward (tail) + ), + std::forward (args)... + ); + } +}