Skip to content

Commit

Permalink
Passthrough is_avalanching from std::hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn authored and martinus committed Oct 5, 2024
1 parent 9fb7847 commit e445b0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/ankerl/unordered_dense.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ struct hash {
}
};

template <typename T>
struct hash<T, typename std::hash<T>::is_avalanching> {
using is_avalanching = void;
auto operator()(T const& obj) const noexcept(noexcept(std::declval<std::hash<T>>().operator()(std::declval<T const&>())))
-> uint64_t {
return std::hash<T>{}(obj);
}
};

template <typename CharT>
struct hash<std::basic_string<CharT>> {
using is_avalanching = void;
Expand Down

0 comments on commit e445b0d

Please sign in to comment.