From e25562a91da76063c8f0e0f2e4076c1602b28529 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 4 Mar 2015 17:52:04 +0300 Subject: [PATCH] Changed functor signature for erase( Key, Func ) --- cds/container/bronson_avltree_map_rcu.h | 2 +- cds/container/impl/bronson_avltree_map_rcu.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cds/container/bronson_avltree_map_rcu.h b/cds/container/bronson_avltree_map_rcu.h index 87fd612d..b0c24749 100644 --- a/cds/container/bronson_avltree_map_rcu.h +++ b/cds/container/bronson_avltree_map_rcu.h @@ -337,7 +337,7 @@ namespace cds { namespace container { The functor \p Func interface: \code struct extractor { - void operator()(mapped_type& item) { ... } + void operator()(key_type const& key, mapped_type& item) { ... } }; \endcode diff --git a/cds/container/impl/bronson_avltree_map_rcu.h b/cds/container/impl/bronson_avltree_map_rcu.h index efe0f6d2..18d55287 100644 --- a/cds/container/impl/bronson_avltree_map_rcu.h +++ b/cds/container/impl/bronson_avltree_map_rcu.h @@ -343,7 +343,7 @@ namespace cds { namespace container { The functor \p Func interface: \code struct extractor { - void operator()(mapped_type& item) { ... } + void operator()( key_type const& key, std::remove_pointer::type& val) { ... } }; \endcode @@ -357,9 +357,9 @@ namespace cds { namespace container { return do_remove( key, key_comparator(), - [&f]( key_type const&, mapped_type pVal, rcu_disposer& disp ) -> bool { + [&f]( key_type const& key, mapped_type pVal, rcu_disposer& disp ) -> bool { assert( pVal ); - f( *pVal ); + f( key, *pVal ); disp.dispose_value(pVal); return true; } @@ -380,9 +380,9 @@ namespace cds { namespace container { return do_remove( key, cds::opt::details::make_comparator_from_less(), - [&f]( key_type const&, mapped_type pVal, rcu_disposer& disp ) -> bool { + [&f]( key_type const& key, mapped_type pVal, rcu_disposer& disp ) -> bool { assert( pVal ); - f( *pVal ); + f( key, *pVal ); disp.dispose_value(pVal); return true; } -- 2.34.1