Boost Users :
From: Daniel James (daniel_james_at_[hidden])
Date: 2008-06-17 18:23:28
On 17/06/2008, Igor R <boost.lists_at_[hidden]> wrote:
> 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:
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net