I am using a std::multimap
to map from a key to a set of matching values. I have a situation where I want to be able to list/iterate over the unique keys in the map.
How do I get an iterator of the unique keys in a C++ multimap?
Another option is using a map<K, set<V>>
, but that requires more manual management.