开发者

Counting keys in a hash_multimap

开发者 https://www.devze.com 2022-12-12 08:46 出处:网络
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 entitie

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消