21 Mar
2007
21 Mar
'07
7:32 p.m.
Hi Boris,
----- Mensaje original -----
De: Boris
I've been using Boost Multiindex quite a lot but don't understand why the code below inserts two items. The container has a unique hash index and the two items return the same hash value. Is this is a bug in the library or in my code? [...] indexed_by
> >
Here's the problem: your key is shared_ptr<foo>, i.e.,
you compare *the pointers* rather than the pointed to
foo objects. What you want is this instead:
indexed_by