
On 17/06/2008, Igor R
I'd like to define hash_value() for some types defined in Boost, in order to use those types in hashed containers. It seems that the only way to do this is to define hash_value() in namespace boost, or the inner namespaces (where the desired type is defined) - isn't it?
You could create a new type that wraps the boost type in another namespace, so that you can define hash_value in that namespace - but that might be a lot of effort. Or you could just use your own hash function.
Is this legal?
It's a grey area ;). It's up to your judgement - I expect you understand the issues. I don't think we should be too precious about this. After all, boost is open source. Also, please submit a feature request ticket using the boost trac: http://svn.boost.org/trac/boost/newticket Daniel