typedef typename node_type::stored_value_type value_type;
static bool const c_isConst = intrusive_iterator::c_isConst;
- typedef typename std::conditional< c_isConst, value_type const &, value_type &>::type value_ref;
+ typedef typename std::conditional< c_isConst, value_type const&, value_type&>::type value_ref;
+ template <typename FwdIt> friend class iterator;
intrusive_iterator m_It;
: m_It( it )
{}
- intrusive_iterator const& underlying_iterator() const
- {
- return m_It;
- }
-
public:
iterator()
: m_It()
template <typename FwIt>
bool operator ==(iterator<FwIt> const& i ) const
{
- return m_It == i.underlying_iterator();
+ return m_It == i.m_It;
}
template <typename FwIt>
bool operator !=(iterator<FwIt> const& i ) const
typedef BackOff back_off;
typedef typename node_traits::node_type node_type;
typedef typename node_traits::value_type value_type;
- static bool const c_isConst = IsConst;
+ static CDS_CONSTEXPR bool const c_isConst = IsConst;
typedef typename std::conditional< c_isConst, value_type const &, value_type &>::type value_ref;
+ friend class iterator< gc, node_traits, back_off, !c_isConst >;
protected:
- typedef typename node_type::atomic_ptr atomic_ptr;
- node_type * m_pNode;
+ typedef typename node_type::atomic_ptr atomic_ptr;
+ node_type * m_pNode;
public: // for internal use only!!!
iterator( node_type& refHead )
return it;
}
- node_type * node() const
- {
- return m_pNode;
- }
-
public:
iterator()
: m_pNode( nullptr )
template <typename Bkoff, bool C>
bool operator ==(iterator<gc, node_traits, Bkoff, C> const& i ) const
{
- return m_pNode == i.node();
+ return m_pNode == i.m_pNode;
}
template <typename Bkoff, bool C>
bool operator !=(iterator<gc, node_traits, Bkoff, C> const& i ) const