From bd500868a7bff6bd560fe0af4af7caafc9283c12 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Tue, 5 Jan 2016 22:47:57 +0200 Subject: [PATCH] Eluna attempt fix linux --- BindingMap.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BindingMap.h b/BindingMap.h index 5320628..f3063ed 100644 --- a/BindingMap.h +++ b/BindingMap.h @@ -11,6 +11,7 @@ #include "Common.h" #include "ElunaUtility.h" #include "Hooks.h" +#include extern "C" { @@ -280,11 +281,18 @@ public: return std::hash()(t); } + template < typename T, std::enable_if_t::value> > + static inline result_type hash(T const & t) + { + typedef std::underlying_type::type Enum_type; + return std::hash()(static_cast(t)); + } + private: template static inline void _hash_combine(result_type& seed, T const & v) { - seed ^= std::hash()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); + seed ^= hash(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); } template