diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index f379e80e..fca3b2c0 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -590,6 +590,24 @@ private: std::size_t pos,step=0; }; +struct no_mix +{ + template + static inline std::size_t mix(const Hash& h,const T& x) + { + return h(x); + } +}; + +struct xmx_mix +{ + template + static inline std::size_t mix(const Hash& h,const T& x) + { + return xmx(h(x)); + } +}; + template class table; @@ -755,19 +773,6 @@ struct table_arrays value_type *elements; }; -struct no_mix -{ - static inline std::size_t mix(std::size_t x)noexcept{return x;} -}; - -struct xmx_mix -{ - static inline std::size_t mix(std::size_t x)noexcept - { - return xmx(x); - } -}; - struct if_constexpr_void_else{void operator()()const{}}; template @@ -1317,7 +1322,7 @@ private: template inline std::size_t hash_for(const Key& x)const { - return mix_policy::mix(h()(x)); + return mix_policy::mix(h(),x); } inline std::size_t position_for(std::size_t hash)const