|
Boost : |
Subject: Re: [boost] [ boost ] [ Trie ]
From: Cosmin Boaca (boost.cosmin.boaca_at_[hidden])
Date: 2015-04-08 15:49:31
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk