special case for pointers

This commit is contained in:
Sébastien Loriot 2021-05-27 14:36:55 +02:00
parent 18ca811f7f
commit cec93d0c9f
1 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,16 @@ namespace internal{
sizeof( typename std::iterator_traits<H>::value_type);
}
};
template <class H>
struct Hash_functor<H*>{
std::size_t
operator()(const H* h)
{
return std::size_t(h) /
sizeof(H);
}
};
}
}