I have question with Boost::bimap and could not find answer from boost document.
using AToBBimap = boost::bimap< boost::bimaps::unordered_set_of<CString>, boost::bimaps::multiset_of<CString> >; //hashed bimap
using AToBBimapValueT = AToBBimap ::value_type;
AToBBimap bi_map;
bi_map.insert(AToBBimapValueT{"message1", "value"});
bi_map.insert(AToBBimapValueT{"message2", "value"});
bi_map.right.find("value");
QUESTION: with bi_map.right.find("value") looks like can only get iterator to {"message1", "value"}, is there possible to get a list of both matching like [{"message1", "value"}, {"message2", "value"}]?
The answer is
equal_range("value"), like withstd::multisetandstd::multimap.That member returns a pair of iterators, which is conveniently compatible with Boost's iterator-range factory, so you can use it: