Boost logo

Boost Users :

From: Daniel James (daniel_james_at_[hidden])
Date: 2007-03-22 05:17:24


On Tue, 20 Mar 2007 17:54:53 -0000, Joaquín Mª López Muñoz
<joaquin_at_[hidden]> wrote:

>> Maybe it would be better if boost::hash included a size_t version:
>>
>> inline std::size_t hash_value(std::size_t v)
>> {
>> return v;
>> }
>>
>> If necessary, in cases where std::size_t == unsigned int, it could
>> probably use is_same<T,U> to make sure both versions didn't exist and
>> cause warnings/errors.

Sorry, I didn't notice this thread before. This has actually been fixed in
1.34, and 1.35 will have proper suport for 'long long' and 'unsigned long
long'. If you can't upgrade when 1.34 is released (which should be soon?),
I'd suggest that you add this function to the boost namespace, either in
or before the boost headers. It's a pretty nasty hack but the warning is
valid so it's worth it.

Daniel


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net