RB
Size: a a a
RB
RB
AN
ΑZ
ΑZ
SP
RB
let mut hm = HashSet::<(i32, i32)>::new();
hm.find((123, 123));
RB
MB
AN
EG
.contains()
и принимает ссылкуRB
RB
error[E0599]: no method named `contains
found for struct HashSet<pair<i32, i32>>
in the current scope` - т.е. мусор.RB
|
3 | struct pair<A, B> {
| -----------------
| |
| doesn't satisfy `pair<i32, i32>: Eq`
| doesn't satisfy `pair<i32, i32>: Hash`
...
14 | hm.contains(123);
| ^^^^^^^^ method not found in `HashSet<pair<i32, i32>>`
|
= note: the method `contains` exists but the following trait bounds were not satisfied:
`pair<i32, i32>: Eq`
`pair<i32, i32>: Hash`
AN
RB
/opt/compiler-explorer/gcc-trunk-20210306/include/c++/11.0.1/bits/stl_function.h:386:20: error: no match for 'operator<' (operand types are 'const pair<int, int>' and 'const pair<int, int>')
386 | { return __x < __y; }
| ~~~~^~~~~
RB
C
AN
std::unordered_set