id summary reporter owner description type status milestone component version severity resolution keywords cc 5641 Multiple keys in same index for same value in multi_index Aaron Moss Joaquín M López Muñoz "I have a collection of data objects analogous to this one: {{{#!c++ struct foo { bar b; std::set s; quux q; }; }}} which I want to be able to efficiently search either by b, or any element of s (q is extra information). The natural way to do that would be some sort of multi_index-like container, where I have a hash-map of bar to foo (with one key per value), and another hash-map of baz to foo (with multiple keys mapping to the same foo). I may be mistaken, but I don't believe the second map can be set up (efficiently, in its obvious implementation) in the current multi_index. However, if it is allowable to have different sizes for different views of the same collection / different numbers of keys of the same index mapping to the same value, it would perhaps be a useful capability. Without looking at the Boost sources, this would probably involve generalizing key extractors to support multiple keys from the same value, with syntax looking something like the following: {{{#!c++ typedef multi_index_container< foo, indexed_by< hashed_unique< member >, hashed_unique< member_collection::iterator, &foo::s.begin, &foo::s.end> > > > my_map; }}}" Feature Requests closed To Be Determined multi_index Boost 1.46.1 Not Applicable wontfix