Skip to content

Conversation

@Halcao
Copy link

@Halcao Halcao commented Jul 25, 2020

The code cannot compile due to error:

/src/LoopClosing.cc:2418:51: error: no matching function for call to 'std::list<ORB_SLAM3::KeyFrame*>::erase(std::list<ORB_SLAM3::KeyFrame*>::const_iterator&)'
                 it = mlpLoopKeyFrameQueue.erase(it);

I looked it up on stackoverflow, and it says that const_iterator indicates a position and cannot be the argument of erase until c++11 had overload erase for const_iterator. calling-erase-with-iterator-vs-const-iterator

The question is that I am using g++ of gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) which supports c++ 11. So for the compatibility of c++ versions concern, we'd better replace const_iterator to iterator, which works on my computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants