r/cpp • u/BgA_stan • May 03 '26
When to actually use a set
https://dubeykartikay.com/posts/why-never-use-std-unordered-set/reposted with a different title, as i got feedback the previous title was clickbait
21
Upvotes
View all comments
Show parent comment
0
u/BgA_stan May 03 '26
Yup, if you NEED a hash based de-dulp, you have to use a set. In the case of uuids however, id prefer what another commentor suggested, sorting and using binary search. Given the uuid is modern can can be sorted. Like v7