diff --git a/include/string_hash.h b/include/string_hash.h
index a19213fc1..5ffc03d26 100644
--- a/include/string_hash.h
+++ b/include/string_hash.h
@@ -26,20 +26,19 @@ along with this program. If not, see .
namespace edb {
namespace detail {
-template
-constexpr std::enable_if_t string_hash(const char (&)[N]) {
- return 0;
+template
+constexpr uint64_t string_hash(const char (&array)[N]) {
+ if constexpr (Index == 0) {
+ return 0;
+ } else {
+ return string_hash(array) | ((array[Index - 1] & 0xffull) << (8 * (Index - 1)));
+ }
}
-template
-constexpr std::enable_if_t string_hash(const char (&array)[N]) {
- return string_hash(array) | ((array[n - 1] & 0xffull) << (8 * (n - 1)));
}
-}
-
-template
-constexpr std::enable_if_t string_hash(const char (&array)[N]) {
+template >
+constexpr uint64_t string_hash(const char (&array)[N]) {
return detail::string_hash(array);
}