mercredi 26 septembre 2018

Why unordered_set doesn't allow vector as key?

For example:

vector<int> v = {1, 2, 3};
unordered_set<vector<int>> s;
s.insert(v);

will gives error

no match for call to '(const std::hash >) (const std::vector&)' noexcept(declval()(declval()))>

Aucun commentaire:

Enregistrer un commentaire