Closed davidthings closed 8 years ago
Hi. Sorry I don't have a Linux machine. Will reformat old laptop to investigate.
Reproduced this on Travis using "Trusty" linux box using Ubuntu 14.04.
In file included from /home/travis/build/billyquith/ponder/include/ponder/enum.hpp:41:
/home/travis/build/billyquith/ponder/include/ponder/detail/dictionary.hpp:123:24: error:
no matching member function for call to 'erase'
m_contents.erase(it);
~~~~~~~~~~~^~~~~
/home/travis/build/billyquith/ponder/include/ponder/detail/dictionary.hpp:110:9: note:
in instantiation of member function
'ponder::detail::Dictionary<std::basic_string<char>, long,
ponder::Enum::EnumCmp>::erase' requested here
erase(key);
^
/home/travis/build/billyquith/ponder/src/enumbuilder.cpp:48:23: note: in
instantiation of member function
'ponder::detail::Dictionary<std::basic_string<char>, long,
ponder::Enum::EnumCmp>::insert' requested here
m_target->m_enums.insert(name, value);
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:1075:7: note:
candidate function not viable: no known conversion from
'__normal_iterator<const std::pair<std::basic_string<char>, long> *,
[...]>' to '__normal_iterator<pointer, [...]>' for 1st argument
erase(iterator __position);
^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:1096:7: note:
candidate function not viable: requires 2 arguments, but 1 was provided
erase(iterator __first, iterator __last);
^
1 error generated.
make[3]: *** [CMakeFiles/ponder.dir/src/enumbuilder.cpp.o] Error 1
make[2]: *** [CMakeFiles/ponder.dir/all] Error 2
make[1]: *** [test/CMakeFiles/pondertest.dir/rule] Error 2
make: *** [pondertest] Error 2
It looks to be the result of a bug in libstdc++. Which according to this is fixed in 4.9. Above version is 4.8.
So one solution is to update your version of GCC 4.9+.
This library looks really great. Eager to try it.
To wit, I just did a git clone / cmake / make and I got the following (rather inscrutable) compiler error