
27 Feb
2010
27 Feb
'10
7:42 p.m.
On 27 February 2010 19:37, André Santee
Thanks, I solved my problem by doing this:
namespace boost { std::size_t hash_value(const GS_VECTOR2 &v2) { return ((std::size_t)v2.y*COLUMNS)+(std::size_t)v2.x; } };
Is it also ok?
Yes, but unless you're using a really old compiler that doesn't support argument dependent lookup (ADL), you should put the function in the same namespace as your vector. You can read about ADL at: http://en.wikipedia.org/wiki/Argument_dependent_name_lookup Daniel