C++11 get all items of one bucket in a unordered_map

前端 未结 1 1871
天命终不由人
天命终不由人 2021-01-20 16:52

we know std::unordered_map::bucket return A bucket is a slot in the container\'s internal hash table to which elements are assigned based on the hash value of t

相关标签:
1条回答
  • 2021-01-20 17:32

    You can use std::unordered_map::begin(int) and std::unordered_map::end(int) to get iterators for a particular bucket.

    0 讨论(0)
提交回复
热议问题