On Tue, 20 Mar 2007 17:54:53 -0000, Joaquín Mª López Muñoz
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. Daniel