2015-02-23 23:04 GMT+04:00 Cosmin Boaca :
Hello,
I really don't know what do to. I'm getting some compile errors that make
no sense for me. For instance :
trie_map tm;
trie t;
trie_map::const_iterator it(tm.cend()); // raises compile error
trie::const_iterator(t.cend()); // works fine
I have no idea why the compile error is raised there. Should I push the
changes so you may take a look ?
First error is in trie_set at line 50. There trie_type t is used which is
trie. trie_set::iterator is a const iterator, while
trie can also return nonconst iterators.Take a look
at line 50 in trie_set.hpp:
iterator begin()
{
return t.begin();
}
Here `iterator` is a `const_iterator`, while `t.begin();` returns nonconst
iterator. Solution would be a call to `t.cbegin()` method. In that case
const_iterator will be returned.
Investigate the problem further, same errors are with non const qualified
end(), rend(), rbegin()
A few more notes:
* line 238 at trie.hpp requires C++11 because of std::ref. This can be
relaxed, if you'll rewrite the body:
return std::pair, Value&>(get_key(), vnode->value);
* 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.
In case of any errors or problems do not hesitate to contact me and ask
questions.
--
Best regards,
Antony Polukhin