nathanielherman / sto

Software Transactional Objects
20 stars 12 forks source link

RBTreeIterator doesn't conform to STL #11

Open ghost opened 8 years ago

ghost commented 8 years ago

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

ghost commented 8 years ago

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!