Add rehash, add missing move in insert()

This commit is contained in:
Christian Mazakas
2023-03-22 10:46:19 -07:00
parent 0b2829c793
commit 9b85c38e37

View File

@@ -126,7 +126,7 @@ namespace boost {
/// ///
bool insert(value_type const& obj) { return table_.insert(obj); } bool insert(value_type const& obj) { return table_.insert(obj); }
bool insert(value_type&& obj) { return table_.insert(obj); } bool insert(value_type&& obj) { return table_.insert(std::move(obj)); }
bool insert(init_type const& obj) { return table_.insert(obj); } bool insert(init_type const& obj) { return table_.insert(obj); }
bool insert(init_type&& obj) { return table_.insert(std::move(obj)); } bool insert(init_type&& obj) { return table_.insert(std::move(obj)); }
@@ -143,6 +143,10 @@ namespace boost {
{ {
return table_.visit_all(std::move(f)); return table_.visit_all(std::move(f));
} }
/// Hash Policy
///
void rehash(size_type n) { table_.rehash(n); }
}; };
} // namespace unordered } // namespace unordered
} // namespace boost } // namespace boost