It seems like when I try to define an unordered_set of vector, I get an error saying: "Call to implicitly-deleted default constructor of unordered_set< vector<int> >
." This doesn't happen when I define a regular (ordered) set: set< vector<int> >
. It seems like I need to define hash<vector<int>>
in order to get rid of the error.
Does anyone know why I get this error only when I use unordered_set
? Shouldn't both data structures use hashing, so why would an unordered_set need a custom-defined hash function? In fact, shouldn't a regular (ordered) set
need some custom-defined comparator as well in order to order the vector<int>
data structures?