Top "Unordered-set" questions

`std::unordered_set` is an associative container that contains set of unique objects.

How does one iterate through an unordered set in C++?

Suppose I have an unordered set unordered_set<int> my_set; myset.insert(1); myset.insert(2); myset.insert(3); How …

c++ c++11 iteration unordered-set
How to specialize std::hash<Key>::operator() for user-defined type in unordered containers?

To support user-defined key types in std::unordered_set<Key> and std::unordered_map<Key, Value> …

c++ hash c++11 unordered-map unordered-set
How can I make an unordered set of pairs of integers in C++?

The following program does not compile an unordered set of pairs of integers, but it does for integers. Can unordered_…

c++ std-pair unordered-set
How do I use unordered_set?

I am trying to define an unordered_set like this: unordered_set<Point> m_Points; When I compile …

c++ stl set unordered-set
Inserting into an unordered_set with custom hash function

I have the following code to make an unordered_set<Interval>. This compiles fine. struct Interval { unsigned int …

c++ c++11 unordered-set
Generic hash for tuples in unordered_map / unordered_set

Why doesn't std::unordered_map<tuple<int, int>, string> just work out of the box? It …

c++ c++11 tuples unordered-map unordered-set
adding elements of a vector to an unordered set

Is there an easy way to add all the elements of a vector to an unordered_set? They are of …

c++ vector unordered-set
compilation problems with unordered set

I am trying to use an unordered_set from the C++ std library. I am using the std namespace. using …

c++ c++11 unordered-set
Boost - unordered_set tutorial/examples/ANYTHING?

I'd like to use unordered_set in a project. However, documentation for it is either incomplete or just a technical …

c++ boost stl c++11 unordered-set
set vs unordered_set for fastest iteration

In my application I have the following requirements - The data structure will be populated just once with some values (…

c++ c++11 stl set unordered-set