ADL can be used with hash_value()

This commit is contained in:
Sébastien Loriot 2022-07-22 11:52:24 +02:00
parent 7a5cbc6940
commit d33b46724e
1 changed files with 3 additions and 1 deletions

View File

@ -86,13 +86,15 @@ namespace internal {
template<class T>
struct hash_item<T, false> {
std::size_t operator()(T i) const {
return boost::hash_value(i);
using boost::hash_value;
return hash_value(i);
}
};
template<class T>
struct hash_item<T, true> {
std::size_t operator()(T i) const {
using boost::hash_value;
return boost::hash_value(i.operator->());
}
};