
31 Jul
2009
31 Jul
'09
6:54 p.m.
Jason Leger <jasonoleger <at> gmail.com> writes:
Hey Everyone,I am basically trying to create a sorted hash map using boost multiindex. I am following the examples but I am unable to insert my object into the container when I use a non-primitive key.
[...]
// hashed on key hashed_unique<member<Data,Key,&Data::key> >
You forgot here to specify the custom hash predicate that you even have already defined presumably for this purpose. Replace with: // hashed on key hashed_unique<member<Data,Key,&Data::key>, KeyHash> and you're done. Thanks for using Boost.MultiIndex, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo