Skip to content

Commit

Permalink
Add operator!
Browse files Browse the repository at this point in the history
  • Loading branch information
igaztanaga committed Jun 12, 2022
1 parent 3c5c8ce commit 466ff07
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/boost/intrusive/detail/slist_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ class slist_iterator
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
{ return members_.get_ptr(); }

BOOST_INTRUSIVE_FORCEINLINE bool operator!() const
{ return !members_.nodeptr_; }

public:
BOOST_INTRUSIVE_FORCEINLINE slist_iterator& operator++()
{
Expand All @@ -111,7 +114,7 @@ class slist_iterator
{ return l.pointed_node() == r.pointed_node(); }

BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const slist_iterator& l, const slist_iterator& r)
{ return !(l == r); }
{ return l.pointed_node() != r.pointed_node(); }

BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
{ return *operator->(); }
Expand Down

0 comments on commit 466ff07

Please sign in to comment.