sto icon indicating copy to clipboard operation
sto copied to clipboard

RBTreeIterator doesn't conform to STL

Open ghost opened this issue 9 years ago • 1 comments

Looks like right now when we dereference an iterator, it gives us the value rather than a std::pair<K, T>?

ghost avatar Nov 16 '15 22:11 ghost

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!

ghost avatar Nov 23 '15 22:11 ghost