//$$CDS-header$$
-#ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_RCU_H
-#define __CDS_CONTAINER_ELLEN_BINTREE_SET_RCU_H
+#ifndef CDSLIB_CONTAINER_ELLEN_BINTREE_SET_RCU_H
+#define CDSLIB_CONTAINER_ELLEN_BINTREE_SET_RCU_H
#include <cds/container/details/ellen_bintree_base.h>
#include <cds/intrusive/ellen_bintree_rcu.h>
static CDS_CONSTEXPR const bool c_bExtractLockExternal = base_class::c_bExtractLockExternal; ///< Group of \p extract_xxx functions do not require external locking
+ //@cond
+ typedef cds::container::ellen_bintree::implementation_tag implementation_tag;
+ //@endcond
+
protected:
//@cond
typedef typename maker::cxx_leaf_node_allocator cxx_leaf_node_allocator;
/// pointer to extracted node
using exempt_ptr = cds::urcu::exempt_ptr < gc, leaf_node, value_type, typename maker::intrusive_traits::disposer,
cds::urcu::details::conventional_exempt_member_cast < leaf_node, value_type >
- > ;
+ >;
public:
/// Default constructor
\endcode
where \p val is the item inserted. User-defined functor \p f should guarantee that during changing
\p val no any other changes could be made on this set's item by concurrent threads.
- The user-defined functor is called only if the inserting is success.
+ The user-defined functor is called only if the inserting is success.
RCU \p synchronize() can be called. RCU should not be locked.
*/
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node const& node) { f( node.m_Value ); } );
}
/// Extracts an item from the set using \p pred for searching
/**
- The function is an analog of \ref cds_nonintrusive_EllenBinTreeSet_rcu_extract "extract(exempt_ptr&, Q const&)"
- but \p pred is used for key compare.
+ The function is an analog of \p extract(Q const&) but \p pred is used for key compare.
\p Less has the interface like \p std::less and should meet \ref cds_container_EllenBinTreeSet_rcu_less
"predicate requirements".
\p pred must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- exempt_ptr extract_with( Q const& val, Less pred )
+ exempt_ptr extract_with( Q const& key, Less pred )
{
- return exempt_ptr( base_class::extract_with_( val,
+ CDS_UNUSED( pred );
+ return exempt_ptr( base_class::extract_with_( key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() ));
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
leaf_node * pNode = base_class::get_with( key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
return pNode ? &pNode->m_Value : nullptr;
};
}} // namespace cds::container
-#endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_RCU_H
+#endif // #ifndef CDSLIB_CONTAINER_ELLEN_BINTREE_SET_RCU_H