+ protected:
+ //@cond
+ template <bool IsConst>
+ class iterator_type
+ :public split_list::details::iterator_type<node_traits, ordered_list, IsConst>
+ {
+ typedef split_list::details::iterator_type<node_traits, ordered_list, IsConst> iterator_base_class;
+ typedef typename iterator_base_class::list_iterator list_iterator;
+ public:
+ iterator_type()
+ : iterator_base_class()
+ {}
+
+ iterator_type( iterator_type const& src )
+ : iterator_base_class( src )
+ {}
+
+ // This ctor should be protected...
+ iterator_type( list_iterator itCur, list_iterator itEnd )
+ : iterator_base_class( itCur, itEnd )
+ {}
+ };
+ //@endcond
+
+ public:
+ ///@name Forward iterators
+ //@{
+ /// Forward iterator
+ /**
+ The forward iterator is based on \p OrderedList forward iterator and has some features:
+ - it has no post-increment operator
+ - it iterates items in unordered fashion
+ - iterator cannot be moved across thread boundary because it may contain GC's guard that is thread-private GC data.
+
+ Iterator thread safety depends on type of \p OrderedList:
+ - for \p MichaelList and \p LazyList: iterator guarantees safety even if you delete the item that iterator points to
+ because that item is guarded by hazard pointer.
+ However, in case of concurrent deleting operations it is no guarantee that you iterate all item in the set.
+ Moreover, a crash is possible when you try to iterate the next element that has been deleted by concurrent thread.
+ Use this iterator on the concurrent container for debugging purpose only.
+ - for \p IterableList: iterator is thread-safe. You may use it freely in concurrent environment.
+ */
+ typedef iterator_type<false> iterator;
+
+ /// Const forward iterator
+ /**
+ For iterator's features and requirements see \ref iterator
+ */
+ typedef iterator_type<true> const_iterator;
+
+ /// Returns a forward iterator addressing the first element in a split-list
+ /**
+ For empty list \code begin() == end() \endcode
+ */
+ iterator begin()
+ {
+ return iterator( m_List.begin(), m_List.end());
+ }
+
+ /// Returns an iterator that addresses the location succeeding the last element in a split-list
+ /**
+ Do not use the value returned by <tt>end</tt> function to access any item.
+
+ The returned value can be used only to control reaching the end of the split-list.
+ For empty list \code begin() == end() \endcode
+ */
+ iterator end()
+ {
+ return iterator( m_List.end(), m_List.end());
+ }
+
+ /// Returns a forward const iterator addressing the first element in a split-list
+ const_iterator begin() const
+ {
+ 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 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());
+ }
+ //@}
+