Filip Konvi?ka ha escrito: [...]
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.
Well, /Wp64 is useful, but only for simple cases: once static polymorphism enters the scene (function overloads, template metaprogramming...) it is easy to unwantedly fool this option. You might want to try to convince the Boost.Hash author to take care of this by guarding the relevant code inside the lib with #pragma warning(push) #pragma warning(disable:4312 4311) ... #pragma warning(pop) when appropriate (i.e. only for VC++ 7.1 (and 8.0?) etc.); or better yet, you can try to do the modifications yourself and propose the resulting patch here at the list. Best regards, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo