//@endcond
public:
+ ///@name Forward iterators (only for debugging purpose)
+ //@{
/// Forward iterator
/**
The forward iterator for Michael's list has some features:
*/
typedef iterator_type<true> const_iterator;
- ///@name Forward iterators (only for debugging purpose)
- //@{
/// Returns a forward iterator addressing the first element in a list
/**
For empty list \code begin() == end() \endcode
//@endcond
public:
+ ///@name Forward iterators
+ //@{
/// Forward iterator
+ /**
+ You may safely use iterators in multi-threaded environment only under external RCU lock.
+ Otherwise, a program crash is possible if another thread deletes the item the iterator points to.
+ */
typedef iterator_type<false> iterator;
/// Const forward iterator
}
/// Returns a forward const iterator addressing the first element in a list
- //@{
const_iterator begin() const
{
const_iterator it( head() );
++it; // skip dummy head
return it;
}
+
+ /// Returns a forward const iterator addressing the first element in a list
const_iterator cbegin() const
{
const_iterator it( head() );
++it; // skip dummy head
return it;
}
- //@}
/// Returns an const iterator that addresses the location succeeding the last element in a list
- //@{
const_iterator end() const
{
return const_iterator( tail());
}
+
+ /// Returns an const iterator that addresses the location succeeding the last element in a list
const_iterator cend() const
{
return const_iterator( tail());
}
- //@}
+ //@}
public:
/// Default constructor
//@endcond
public:
+ ///@name Forward iterators
+ //@{
/// Forward iterator
+ /**
+ You may safely use iterators in multi-threaded environment only under external RCU lock.
+ Otherwise, a program crash is possible if another thread deletes the item the iterator points to.
+ */
typedef iterator_type<false> iterator;
/// Const forward iterator
}
/// Returns a forward const iterator addressing the first element in a list
- //@{
const_iterator begin() const
{
return const_iterator( head() );
}
+ /// Returns a forward const iterator addressing the first element in a list
const_iterator cbegin() const
{
return const_iterator( head() );
}
- //@}
/// Returns an const iterator that addresses the location succeeding the last element in a list
- //@{
const_iterator end() const
{
return const_iterator();
}
+ /// Returns an const iterator that addresses the location succeeding the last element in a list
const_iterator cend() const
{
return const_iterator();
}
- //@}
+ //@}
public:
/// Default constructor
//@endcond
public:
+ ///@name Forward iterators (only for debugging purpose)
+ //@{
/// Forward iterator
+ /**
+ You may safely use iterators in multi-threaded environment only under RCU lock.
+ Otherwise, a crash is possible if another thread deletes the item the iterator points to.
+ */
typedef iterator_type<false> iterator;
+
/// Const forward iterator
typedef iterator_type<true> const_iterator;
{
return const_iterator();
}
+ //@}
public:
/// Default constructor initializes empty list