
31 Jan
2012
31 Jan
'12
8:17 p.m.
On Tuesday, January 31, 2012 20:06:23 Daniel James wrote:
From libc++:
template <> struct _LIBCPP_VISIBLE hash<int>
: public unary_function<int, size_t>
{ _LIBCPP_INLINE_VISIBILITY size_t operator()(int __v) const _NOEXCEPT {return static_cast<size_t>(__v);} };
Last time I tried it, libstdc++ was similar.
Too bad. I really hope these libraries will get improved eventually. Otherwise, std::hash is useless aside from std::unordered* containers.