From f51070ab21ba3e4c201aa341f31ab9233a41726f Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Thu, 15 Jun 2023 09:50:27 -0700 Subject: [PATCH] Update free function erase_if() to support non-copyable predicates --- 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 a47eee81..2207b9a0 100644 --- a/include/boost/unordered/concurrent_flat_map.hpp +++ b/include/boost/unordered/concurrent_flat_map.hpp @@ -93,6 +93,10 @@ namespace boost { bool friend operator==(concurrent_flat_map const& lhs, concurrent_flat_map const& rhs); + template + friend typename concurrent_flat_map::size_type erase_if( + concurrent_flat_map& set, Predicate pred); + public: using key_type = Key; using mapped_type = T; @@ -704,7 +708,7 @@ namespace boost { typename concurrent_flat_map::size_type erase_if( concurrent_flat_map& c, Predicate pred) { - return c.erase_if(pred); + return c.table_.erase_if(pred); } #if BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES