2015-02-27 15:01 GMT+03:00 Cosmin Boaca :
Hello,
I have managed to remove the template parameters and get all the tests
compiling and running [0]. Also, I have fixed the begin, end, rbegin(),
rend() functions from trie_set / trie_multiset [1] and I have used std::ref
in operator* only when the compiler supports rvalue references[2].
The solution with make_pair, 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, 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
described here:
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
boost installation.
* 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
trie_set|trie_map|trie_multiset|trie_multimap.
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::const_iterator it = t.cbegin();" issue on Monday or Tuesday.
--
Best regards,
Antony Polukhin