From 9b85c38e374bc0fec5562578dc73559adf111e1b Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Wed, 22 Mar 2023 10:46:19 -0700 Subject: [PATCH] Add rehash, add missing move in insert() --- include/boost/unordered/concurrent_flat_map.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/unordered/concurrent_flat_map.hpp b/include/boost/unordered/concurrent_flat_map.hpp index 0be57eef..c21660b8 100644 --- a/include/boost/unordered/concurrent_flat_map.hpp +++ b/include/boost/unordered/concurrent_flat_map.hpp @@ -126,7 +126,7 @@ namespace boost { /// 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&& obj) { return table_.insert(std::move(obj)); } @@ -143,6 +143,10 @@ namespace boost { { return table_.visit_all(std::move(f)); } + + /// Hash Policy + /// + void rehash(size_type n) { table_.rehash(n); } }; } // namespace unordered } // namespace boost