Fixed iterator issues in set/map
[libcds.git] / cds / intrusive / split_list_rcu.h
index d21ba0f4d73eb7619633f6aacc700bba8cd79d56..fa3bc86b99e69e42655ea738e0e74a558aee71df 100644 (file)
@@ -979,13 +979,23 @@ namespace cds { namespace intrusive {
         /// Returns a forward const iterator addressing the first element in a split-list
         const_iterator begin() const
         {
-            return const_iterator( m_List.begin(), m_List.end() );
+            return cbegin();
+        }
+        /// Returns a forward const iterator addressing the first element in a split-list
+        const_iterator cbegin() const
+        {
+            return const_iterator( m_List.cbegin(), m_List.cend() );
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a split-list
         const_iterator end() const
         {
-            return const_iterator( m_List.end(), m_List.end() );
+            return cend();
+        }
+        /// Returns an const iterator that addresses the location succeeding the last element in a split-list
+        const_iterator cend() const
+        {
+            return const_iterator( m_List.cend(), m_List.cend() );
         }
 
     };