[&f](node_type& node) { f( node.m_Value ); } );
}
+ /// Deletes the item pointed by iterator \p iter (only for \p IterableList based set)
+ /**
+ Returns \p true if the operation is successful, \p false otherwise.
+ The function can return \p false if the node the iterator points to has already been deleted
+ by other thread.
+
+ The function does not invalidate the iterator, it remains valid and can be used for further traversing.
+
+ @note \p %erase_at() is supported only for \p %SplitListSet based on \p IterableList.
+ */
+#ifdef CDS_DOXYGEN_INVOKED
+ bool erase_at( iterator const& iter )
+#else
+ template <typename Iterator>
+ typename std::enable_if< std::is_same<Iterator, iterator>::value && is_iterable_list< ordered_list >::value, bool >::type
+ erase_at( Iterator const& iter )
+#endif
+ {
+ return base_class::erase_at( static_cast<typename iterator::iterator_base_class const&>( iter ));
+ }
+
+
/// Extracts the item with specified \p key
/** \anchor cds_nonintrusive_SplitListSet_hp_extract
The function searches an item with key equal to \p key,
template <typename Q, typename Func>
bool find_( Q& val, Func f )
{
- return base_class::find( val, [&f]( node_type& item, Q& val ) { f( item.m_Value, val ); } );
+ return base_class::find( val, [&f]( node_type& item, Q& v ) { f( item.m_Value, v ); } );
}
template <typename Q>
{
CDS_UNUSED( pred );
return base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type(),
- [&f]( node_type& item, Q& val ) { f( item.m_Value, val ); } );
+ [&f]( node_type& item, Q& v ) { f( item.m_Value, v ); } );
}
template <typename Q, typename Less>