Subject: Re: [boost] [functional] [shared_ptr] boost::hash<shared_ptr<T>> Returns Only Two Values
From: Daniel James (dnljms_at_[hidden])
Date: 2011-02-25 09:37:02
On 24 February 2011 22:25, Peter Dimov <pdimov_at_[hidden]> wrote:
> But why is there a definition of hash_value( bool ) when this macro isn't
> defined? Shouldn't the largest integral types be enough? Even if they
> aren't, everything below int shouldn't be necessary - it's a standard
> promotion and it shouldn't be ambiguous to omit bool/char/short.
It looks like it was required for Borland.
>> 2. It is said in hash.cpp that BCB has problems with the overload
>> of hash_value for bool. This should be fixed in one way or another
>> (possibly by not defining it for this compiler, I guess.)
>It actually says that BCB has problems without it. There was an overload
>ambiguity error for boost::hash<bool> (although, calling
>boost::hash<bool> would be a very odd thing to do) and that was added to
>work around it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk