Skip to content

Commit

Permalink
add skip_list (cloriSkip)
Browse files Browse the repository at this point in the history
  • Loading branch information
shpilu committed Dec 15, 2018
1 parent a150979 commit 310aae8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,17 +396,17 @@ class sl_iterator
: public std::iterator<std::bidirectional_iterator_tag,
typename SL_IMPL::value_type,
typename SL_IMPL::difference_type,
typename SL_IMPL::const_pointer,
typename SL_IMPL::const_reference>
typename SL_IMPL::pointer,
typename SL_IMPL::reference>
{
public:
typedef SL_IMPL impl_type;
typedef sl_const_iterator<impl_type> const_iterator;
typedef typename impl_type::node_type node_type;
typedef sl_iterator<impl_type> self_type;

typedef typename impl_type::const_reference const_reference;
typedef typename impl_type::const_pointer const_pointer;
typedef typename impl_type::reference reference;
typedef typename impl_type::pointer pointer;

sl_iterator() :
#ifdef SKIP_LIST_DIAGNOSTICS
Expand All @@ -429,8 +429,8 @@ class sl_iterator
self_type operator--(int) // postdecrement
{ self_type old(*this); node = node->prev; return old; }

const_reference operator*() { return node->value; }
const_pointer operator->() { return node->value; }
reference operator*() { return node->value; }
pointer operator->() { return &(node->value); }

bool operator==(const self_type &other) const
{ return node == other.node; }
Expand Down Expand Up @@ -498,7 +498,7 @@ class sl_const_iterator
{ self_type old(*this); node = node->prev; return old; }

const_reference operator*() { return node->value; }
const_pointer operator->() { return node->value; }
const_pointer operator->() { return &node->value; }

bool operator==(const self_type &other) const
{ return node == other.node; }
Expand Down Expand Up @@ -922,7 +922,9 @@ class sl_impl
typedef T value_type;
typedef typename Allocator::size_type size_type;
typedef typename Allocator::difference_type difference_type;
typedef typename Allocator::reference reference;
typedef typename Allocator::const_reference const_reference;
typedef typename Allocator::pointer pointer;
typedef typename Allocator::const_pointer const_pointer;
typedef Allocator allocator_type;
typedef Compare compare_type;
Expand Down

0 comments on commit 310aae8

Please sign in to comment.