Fixed iterator issues in set/map
[libcds.git] / cds / container / impl / skip_list_map.h
index 6ad9a185c37b58195fdde370e08e2bc64a8f50bc..2bc344b871fa8a949fe17e2d4ea35ecf04d6a575 100644 (file)
@@ -3,7 +3,6 @@
 #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>
 
@@ -58,13 +57,13 @@ namespace cds { namespace container {
         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"
 
@@ -82,7 +81,7 @@ namespace cds { namespace container {
         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:
@@ -200,7 +199,7 @@ namespace cds { namespace container {
         {
             return cbegin();
         }
-        const_iterator cbegin()
+        const_iterator cbegin() const
         {
             return const_iterator( base_class::cbegin() );
         }
@@ -218,7 +217,7 @@ namespace cds { namespace container {
         {
             return cend();
         }
-        const_iterator cend()
+        const_iterator cend() const
         {
             return const_iterator( base_class::cend() );
         }