Daniel James ha escrito:
On Tue, 20 Mar 2007 17:54:53 -0000, JoaquÃn Mª López Muñoz
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
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.
Hello Daniel, I think you are misunderstanding the problem.: the warning is
*not* valid because it happens in 32 bit mode, where std::size_t is a
typedef for unsigned int (no longs involved). Please try the following
in MSVC 7.1/8.0 in 32 bit mode with /Wp64 compiler option on:
#include