Boost logo

Boost :

From: Dave Harris (brangdon_at_[hidden])
Date: 2005-03-09 14:32:12


In-Reply-To: <422EFC7F.9D48D181_at_[hidden]>
joaquin_at_[hidden] (=?iso-8859-1?Q?Joaqu=EDn=20M=AA=20L=F3pez=20Mu=F1oz?=)
wrote (abridged):
> Oh, sorry, I misread it. I agree with you hashing a bool makes little
> sense, and agree that it probably shouldn't be made part of the public
> interface (for the same reasons, for instance, that there's no overload
> for char.)

Is that because bools and chars will be promoted to ints?

I can imagine wanting bools and chars to hash differently, to take
advantage of their special properties. Then hash_value('\0') could be
different to hash_value(0), which wouldn't bother me because they are
different types. However I can understand if this is felt too risky for
general use.

-- Dave Harris, Nottingham, UK


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