preface
Using unordered_ The compilation error caused by the set container is a call to the implicitly deleted default constructor.
unordered_map<pair<int, int>>
unordered_set<pair<int, int>>
reason
unordered_ Map and unordered_ Set uses the default STD:: hash to calculate the key, but STD:: hash cannot handle the pair type.
Solution:
Use map, set instead
Custom hash function
Similar Posts:
- Python3: list dict set [UNK]unhashable type
- [Solved] TS error: element implicitly has the type ‘any’ because the type of the index expression is not ‘number’‘
- Error reporting from objectmapper nested JSON to object
- Qiankun Error: Target container with #container not existed while xxx mounting!
- Hibernate:No default constructor for entity [How to Solve]
- [Solved] Protobuf Error: ‘tr1/unordered_map’ file not found
- docker: Error response from daemon: Conflict. The container name “/xx” is already in use
- [LeetCode] 291. Word Pattern II
- error: command ‘gcc’ failed with exit status 1
- Greenplum Error: query plan with multiple segworker groups is not supported