From 0a2f2c2247a5226978b997b9c160e0f8716a4883 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 7 Feb 2015 20:15:22 +0000 Subject: [PATCH] Use parameter pack to that the default hash_value is the worst match --- src/hash.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hash.hh b/src/hash.hh index 6586edfd..3fc8abd2 100644 --- a/src/hash.hh +++ b/src/hash.hh @@ -11,11 +11,11 @@ namespace Kakoune size_t hash_data(const char* data, size_t len); -template -typename std::enable_if::value, size_t>::type -hash_value(const Type& val) +template +size_t hash_value(const Type&... val) { - return std::hash()(val); + static_assert(sizeof...(Type) == 1, ""); + return std::hash()(val...); } template