The compilation error caused when using the unordered_set
container, the literal translation is to call the implicitly deleted default constructor.
unordered_map<pair<int, int>>
unordered_set<pair<int, int>>
Both unordered_map
and unordered_set
use the default std::hash
to calculate the key, and std::hash
cannot handle the pair type.
Use map
, set
instead
Custom hash function