swap() - swap contents with another unordered_map
| 602 | |
| 603 | // swap() - swap contents with another unordered_map |
| 604 | void swap(unordered_map& other) { |
| 605 | // Swap all member variables |
| 606 | _buckets.swap(other._buckets); |
| 607 | fl::swap(_size, other._size); |
| 608 | fl::swap(_tombstones, other._tombstones); |
| 609 | fl::swap(mLoadFactor, other.mLoadFactor); |
| 610 | fl::swap(_occupied, other._occupied); |
| 611 | fl::swap(_deleted, other._deleted); |
| 612 | fl::swap(_hash, other._hash); |
| 613 | fl::swap(_equal, other._equal); |
| 614 | } |
| 615 | |
| 616 | // find pointer to value or nullptr |
| 617 | T *find_value(const Key &key) { |