#ifndef __CDS_CONTAINER_IMPL_SKIP_LIST_MAP_H
#define __CDS_CONTAINER_IMPL_SKIP_LIST_MAP_H
-#include <cds/details/functor_wrapper.h>
#include <cds/gc/guarded_ptr.h>
#include <cds/container/details/guarded_ptr_cast.h>
Like STL map class, %SkipListMap stores its key-value pair as <tt>std:pair< K const, T></tt>.
\warning The skip-list requires up to 67 hazard pointers that may be critical for some GCs for which
- the guard count is limited (like as gc::HP, gc::HRC). Those GCs should be explicitly initialized with
+ the guard count is limited (like \p gc::HP). Those GCs should be explicitly initialized with
hazard pointer enough: \code cds::gc::HP myhp( 67 ) \endcode. Otherwise an run-time exception may be raised
when you try to create skip-list object.
\note There are several specializations of \p %SkipListMap for each \p GC. You should include:
- - <tt><cds/container/skip_list_map_hp.h></tt> for gc::HP garbage collector
- - <tt><cds/container/skip_list_map_ptb.h></tt> for gc::PTB garbage collector
+ - <tt><cds/container/skip_list_map_hp.h></tt> for \p gc::HP garbage collector
+ - <tt><cds/container/skip_list_map_dhp.h></tt> for \p gc::DHP garbage collector
- <tt><cds/container/skip_list_map_rcu.h></tt> for \ref cds_nonintrusive_SkipListMap_rcu "RCU type"
- <tt><cds/container/skip_list_map_nogc.h></tt> for \ref cds_nonintrusive_SkipListMap_nogc "non-deletable SkipListMap"
before end of the map. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires 2 additional hazard pointers, that may be
- a limited resource for \p GC like as gc::HP and gc::HRC (however, for gc::PTB the count of
+ a limited resource for \p GC like \p gc::HP (for gc::PTB the count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
{
return cbegin();
}
- const_iterator cbegin()
+ const_iterator cbegin() const
{
return const_iterator( base_class::cbegin() );
}
{
return cend();
}
- const_iterator cend()
+ const_iterator cend() const
{
return const_iterator( base_class::cend() );
}