Fixed iterator issues in set/map
[libcds.git] / cds / container / split_list_set_rcu.h
index 14fe8c38767736159f1122a26d3a44d478c34ffa..67a5be7712acb87d60b9e2ebd967315c620d7f69 100644 (file)
@@ -388,13 +388,23 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( base_class::begin() );
+            return cbegin();
+        }
+        /// Returns a forward const iterator addressing the first element in a set
+        const_iterator cbegin() const
+        {
+            return const_iterator( base_class::cbegin() );
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
         const_iterator end() const
         {
-            return const_iterator( base_class::end() );
+            return cend();
+        }
+        /// Returns an const iterator that addresses the location succeeding the last element in a set
+        const_iterator cend() const
+        {
+            return const_iterator( base_class::cend() );
         }
 
     public: