Boost logo

Boost Users :

From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2007-03-15 11:36:18


> Do you mean hash_value(unsigned int) is also invoked when using
> boost::hash<std::size_t>, right?
>
Yes.
>> There are other variants of this function, taking bool, int, etc. as the
>> argument, but no size_t.
>>
> This is correct, because std::size_t is a typedef to some builtin
> unsigned integer type.
>
Unfortunately, this is not in the case....

typedef __w64 unsigned int size_t;

This is due to /Wp64, as you have correctly guessed.
> a) look in your stdlib headers (most likely in stddef.h) how size_t is
> defined?
>
See above.
> b) try the following snippet and report whether the warning persists?
>
> #include <cstddef>
>
> void foo(unsigned int){}
>
> int main()
> {
> std::size_t x=0;
> foo(x);
> }
>
This exhibits the same problem. Both are fine without /Wp64. So I think
that adding /Wp64 means that the warning should be turned off.
> Thank you!
>
Thank you!

Cheers,
Filip


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