//@endcond
public:
+ ///@name Forward iterators (thread-safe only under RCU lock)
+ //@{
/// 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;
}
/// Returns a forward const iterator addressing the first element in a list
- //@{
const_iterator begin() const
{
return get_const_begin();
}
+
+ /// Returns a forward const iterator addressing the first element in a list
const_iterator cbegin() const
{
return get_const_begin();
}
- //@}
/// Returns an const iterator that addresses the location succeeding the last element in a list
- //@{
const_iterator end() const
{
return get_const_end();
}
+
+ /// Returns an const iterator that addresses the location succeeding the last element in a list
const_iterator cend() const
{
return get_const_end();
}
- //@}
+ //@}
private:
//@cond
The functor may change non-key fields of the \p item.
While the functor \p f is calling the item \p item is locked.
- Returns <tt> std::pair<bool, bool> </tt> where \p first is \p true if operation is successfull,
+ Returns <tt> std::pair<bool, bool> </tt> where \p first is \p true if operation is successful,
\p second is \p true if new item has been added or \p false if the item with \p key
already is in the list.