\p pred must imply the same element order as the comparator used for building the map.
*/
template <typename Q, typename Less>
- bool extract_with( guarded_ptr& result, Q const& key, Less pred )
+ guarded_ptr extract_with( Q const& key, Less pred )
{
- return base_class::extract_with_( result.guard(), key,
+ CDS_UNUSED( pred );
+ guarded_ptr gp;
+ base_class::extract_with_( gp.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
+ return gp;
}
/// Find the key \p key
\p pred must imply the same element order as the comparator used for building the map.
*/
template <typename Q, typename Less>
- bool get_with( guarded_ptr& result, Q const& key, Less pred )
+ guarded_ptr get_with( Q const& key, Less pred )
{
- return base_class::get_with_( result.guard(), key,
+ CDS_UNUSED( pred );
+ guarded_ptr gp;
+ base_class::get_with_( gp.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() );
+ return gp;
}
/// Clears the map (not atomic)
\p pred must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool extract_with( guarded_ptr& result, Q const& key, Less pred )
+ guarded_ptr extract_with( Q const& key, Less pred )
{
- return base_class::extract_with_( result.guard(), key,
+ CDS_UNUSED( pred );
+ guarded_ptr gp;
+ base_class::extract_with_( gp.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
+ return gp;
}
/// Find the key \p key
\p pred must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool get_with( guarded_ptr& result, Q const& key, Less pred )
+ guarded_ptr get_with( Q const& key, Less pred )
{
- CDS_UNUSED( pred );
- return base_class::get_with_( result.guard(), key,
++ CDS_UNUSED(pred);
+ guarded_ptr gp;
+ base_class::get_with_( gp.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() );
+ return gp;
}
/// Clears the set (not atomic)