sto
sto copied to clipboard
RBTreeIterator doesn't conform to STL
Looks like right now when we dereference an iterator, it gives us the value rather than a std::pair<K, T>
?
Okay, now the iterator interface returns a pair, but operator==
doesn't quite work yet. RBTreeIterator::operator*
and RBTreeIterator::operator->
deal with std::pair<const K, RBProxy<K, T>>
, and STL has std::pair<const K, T>
. Although the cast from RBProxy<K, T>
to T
is defined, the builtin comparison somehow still doesn't work...
Except this one small problem, it's now ready to use with STL algorithms!