What is the most efficient way to count all the different keys in a hash_multimap
?
E.g. if I have a al开发者_开发技巧ready filled hash_multimap
, (e.g. a container where you can store multiple entities with a same key)
how can i retrieve the set of keys?
Insert the keys into a std::set
and find the size of the set.
精彩评论