Boost logo

Boost :

Subject: Re: [boost] [hash] regular behaviour of hash function for double values
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-01-31 15:17:22


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk