| 410 | } |
| 411 | |
| 412 | void swap(HashSet& other) { |
| 413 | // Use argument-dependent lookup with fall-back to std::swap() for function objects. |
| 414 | using std::swap; |
| 415 | swap(allocfn_, other.allocfn_); |
| 416 | swap(hashfn_, other.hashfn_); |
| 417 | swap(emptyfn_, other.emptyfn_); |
| 418 | swap(pred_, other.pred_); |
| 419 | std::swap(data_, other.data_); |
| 420 | std::swap(num_buckets_, other.num_buckets_); |
| 421 | std::swap(num_elements_, other.num_elements_); |
| 422 | std::swap(elements_until_expand_, other.elements_until_expand_); |
| 423 | std::swap(min_load_factor_, other.min_load_factor_); |
| 424 | std::swap(max_load_factor_, other.max_load_factor_); |
| 425 | std::swap(owns_data_, other.owns_data_); |
| 426 | } |
| 427 | |
| 428 | allocator_type get_allocator() const { |
| 429 | return allocfn_; |