
3 Feb
2010
3 Feb
'10
3:46 p.m.
Dejan escribió:
Or is a multi_index_container not the right tool?
Using Boost.MultiIndex might be overkill here if this is all you need from it: an std::set can be used also with a suitable compare predicate.
I don't know if finding pointer OR id is possible in a std::set. I've tried a std::set with a compare class (which compares pointer and id). To store is not a problem but to "container.find(pointer)" AND "container.find(id)".
OK, if you need to find elements by two different criteria then this is Boost.MultiIndex is designed for. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo