I'm using clang 3.4-1ubuntu3. When I try to call std::vector::emplace(const_iterator pos, Args&&... args), I get the error
my_file.hpp:86:9: error: no matching member function for call to 'emplace'
store.emplace(pos, args...);
~~~~~~^~~~~~~
...
/usr/include//c++/4.8/bits/stl_vector.h:958:9: note: candidate function ... not viable: no known
conversion from '__normal_iterator<const_pointer, [...]>' to '__normal_iterator<pointer, [...]>' for 1st argument
emplace(iterator __position, _Args&&... __args);
^
But according to cppreference, std::vector::emplace takes a const_iterator. What's going on here?
Aucun commentaire:
Enregistrer un commentaire