Subject: Re: [boost] [ boost ] [ Trie ]
From: Cosmin Boaca (boost.cosmin.boaca_at_[hidden])
Date: 2015-02-22 08:23:44
I have performed the modifications required in order to use
std::reverse_iterator instead of trie_iterator. . Also, I have optimized
the get_key function . The overall diff can be found here . Please
give me some feedback about the code when you have time.
Also, it seems to be a problem with trie_iterator::operator->. It doesn't
work and I think it may cause memory corruption. I think the problem is
that it returns &(operator *()) which is a value allocated on stack that
gets destroyed when it goes out of scope. However, I don't know how it
should be implemented. Please tell me what do you think about this
operator. As a workaround, instead of using this operator I have used
operator * and the code passes the tests.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk