We already have `swap(raw_hash_set&, raw_hash_set&)` thus we may expect argument dependent lookup will use that function in following code snippet: ``` absl::flat_hash_map<...> x, y; using std::swap; swap(x, y); ``` But in practice `std::swap` will be called because `swap(raw_hash_set&, raw_hash_set&)` requires derived-to-base conversion while `std::swap` doesn't (it is a function template), thus `std::swap` is picked by compiler. To avoid this, we need a `swap` implementations which accept the exact `*_hash_*` types which is more preferred over `std::swap`. Note that this will fix issues#1571. PiperOrigin-RevId: 657419420 Change-Id: Id003b2129187ce2d4583029789ff96247d1490de
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| internal | Loading commit data... | |
| BUILD.bazel | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| btree_benchmark.cc | Loading commit data... | |
| btree_map.h | Loading commit data... | |
| btree_set.h | Loading commit data... | |
| btree_test.cc | Loading commit data... | |
| btree_test.h | Loading commit data... | |
| fixed_array.h | Loading commit data... | |
| fixed_array_benchmark.cc | Loading commit data... | |
| fixed_array_exception_safety_test.cc | Loading commit data... | |
| fixed_array_test.cc | Loading commit data... | |
| flat_hash_map.h | Loading commit data... | |
| flat_hash_map_test.cc | Loading commit data... | |
| flat_hash_set.h | Loading commit data... | |
| flat_hash_set_test.cc | Loading commit data... | |
| hash_container_defaults.h | Loading commit data... | |
| inlined_vector.h | Loading commit data... | |
| inlined_vector_benchmark.cc | Loading commit data... | |
| inlined_vector_exception_safety_test.cc | Loading commit data... | |
| inlined_vector_test.cc | Loading commit data... | |
| node_hash_map.h | Loading commit data... | |
| node_hash_map_test.cc | Loading commit data... | |
| node_hash_set.h | Loading commit data... | |
| node_hash_set_test.cc | Loading commit data... | |
| sample_element_size_test.cc | Loading commit data... |