Subject: Re: [boost] [ boost ] [ Trie ]
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2015-03-01 03:02:27
2015-02-27 15:01 GMT+03:00 Cosmin Boaca <boost.cosmin.boaca_at_[hidden]>:
> I have managed to remove the template parameters and get all the tests
> compiling and running . Also, I have fixed the begin, end, rbegin(),
> rend() functions from trie_set / trie_multiset  and I have used std::ref
> in operator* only when the compiler supports rvalue references.
> The solution with make_pair<vector<key_type>, Value&> works only on non
> C++11 compilers, because on C++11 reference is removed from the return_type
> of make_pair in C++11.
> Please review the code if you have time and tell me what should I do next.
> I think a move constructor for C++11 compilers would be a nice addition.
Good progress, well done!
Instead of using make_pair, just directly call the pair constructor in
C++98 and C++11:
return std::pair<std::vector<key_type>, Value&>(get_key(), vnode->value);
Move constructors and operators are a good addition, they can be added at
any time. Administration related tasks look more significant right now:
* Boost folders structures changed since 2013. Rearrange folders like it is
http://rrsd.com/blincubator.com/requirements_directory_structure/ . Also
you may take a look into the https://github.com/apolukhin/Boost.DLL to see
how the folders must look like. There in Installation section of Readme
you'll find a simple way to install new library/trie into the existing
* When it's done, try to setup autotesting, using this manual:
https://svn.boost.org/trac/boost/wiki/TravisCoverals . This will give you a
simple way to auto test code on Linux platform.
Another significant and hard task:
* trie_node structure looks too heavy: there are too many member variables.
Try to simplify trie_node and value_list_node structures. Think of a
possible optimizations of the trie_node structure for
For example all the sets do not require values, so pointers to value list
nodes can be removed from trie_set in that case.
P.S.: I'll take a look into the "boost::tries::trie<int,
int>::const_iterator it = t.cbegin();" issue on Monday or Tuesday.
-- Best regards, Antony Polukhin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk