8 Apr
2015
8 Apr
'15
7:49 p.m.
Hello, The main problem that appears is the following : In the implementation of the ++ operator I am doing something like iterator it = ++intrusive_set::s_iterator_to(*tnode) if (it != tnode->parent->children.end()) { /* code */ } In the implementation of the -- operator I need to do the reversed operation iterator it = --intrusive_set::s_iterator_to(*tnode) if (it != ??????) { /* code */ } I can't compare it with begin() because the comparison should work for the begin node, but fail for a node that is somehow before begin(), like end() is past the last element. I don't know how to achieve this. I have tried casting the iterator to reverse_iterator but it didn't help me. Cosmin