X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Fcontainer%2Flazy_kvlist_nogc.h;h=03e2b392e4c1e633b9b9a3280ceaecb7cd861d35;hb=7dac077c1f71d753e833caf9a8db36e3ad5793e7;hp=eba231af4eca2d017843d02fa23e9ccb56ecdea4;hpb=8abed38e557d344d68892b9ea16b0bde63ba5ccb;p=libcds.git diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index eba231af..03e2b392 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -92,41 +92,6 @@ namespace cds { namespace container { typedef typename base_class::node_type head_type; //@endcond - private: - //@cond -# ifndef CDS_CXX11_LAMBDA_SUPPORT - struct ensure_functor - { - node_type * m_pItemFound; - - ensure_functor() - : m_pItemFound( nullptr ) - {} - - void operator ()(bool, node_type& item, node_type& ) - { - m_pItemFound = &item; - } - }; - - template - class find_functor: protected cds::details::functor_wrapper - { - typedef cds::details::functor_wrapper base_class; - public: - find_functor( Func f ) - : base_class(f) - {} - - template - void operator ()( node_type& node, Q& ) - { - base_class::get()( node.m_Data ); - } - }; -# endif // ifndef CDS_CXX11_LAMBDA_SUPPORT - //@endcond - protected: //@cond template @@ -566,13 +531,7 @@ namespace cds { namespace container { scoped_node_ptr pNode( alloc_node( key )); node_type * pItemFound = nullptr; -# ifdef CDS_CXX11_LAMBDA_SUPPORT std::pair ret = base_class::ensure_at( &refHead, *pNode, [&pItemFound](bool, node_type& item, node_type&){ pItemFound = &item; } ); -# else - ensure_functor func; - std::pair ret = base_class::ensure_at( &refHead, *pNode, boost::ref(func) ); - pItemFound = func.m_pItemFound; -# endif if ( ret.first && ret.second ) pNode.release(); @@ -596,12 +555,7 @@ namespace cds { namespace container { template bool find_at( head_type& refHead, K& key, Compare cmp, Func f ) { -# ifdef CDS_CXX11_LAMBDA_SUPPORT return base_class::find_at( &refHead, key, cmp, [&f]( node_type& node, K const& ){ cds::unref(f)( node.m_Data ); }); -# else - find_functor wrapper( f ); - return base_class::find_at( &refHead, key, cmp, cds::ref(wrapper) ); -# endif } */ //@endcond