From: khizmax Date: Wed, 4 Mar 2015 14:52:04 +0000 (+0300) Subject: Changed functor signature for erase( Key, Func ) X-Git-Tag: v2.1.0~305^2~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e25562a91da76063c8f0e0f2e4076c1602b28529;p=libcds.git Changed functor signature for erase( Key, Func ) --- 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; }