Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer problem with typedef for iterator and std::vector::insert
Indexer problem with typedef for iterator and std::vector::insert [message #868725] Wed, 02 May 2012 09:00
Nathan Hüsken is currently offline Nathan Hüsken
Messages: 27
Registered: November 2010
Junior Member

I am not sure if I should make a bug report out of this.
I have searched bugzilla, but could not find a similar bug.

With eclipse Juno Release, I created a C++ executable project (Hello World).
I replaced the contents of main with:

#include <vector>
#include <boost/smart_ptr.hpp>

int main() {
typedef boost::shared_ptr<int> INTPTR;
std::vector<INTPTR> m_ints;
typedef std::vector<INTPTR>::iterator ITER;
ITER iter = m_ints.begin();
m_ints.insert(iter, 0);

And now I get from the indexer for the "insert" in the last code line:

Invalid arguments ' Candidates are: __gnu_cxx::__normal_iterator<boost::shared_ptr<int> *,std::vector<boost::shared_ptr<int>,std::allocator<boost::shared_ptr<int>>>> insert(__gnu_cxx::__normal_iterator<boost::shared_ptr<int>
*,std::vector<boost::shared_ptr<int>,std::allocator<boost::shared_ptr<int>>>>, const boost::shared_ptr<int> &) void insert(__gnu_cxx::__normal_iterator<boost::shared_ptr<int> *,std::vector<boost::shared_ptr<int>,std::allocator<boost::shared_ptr<int>>>>, unsigned long
int, const boost::shared_ptr<int> &) void insert(__gnu_cxx::__normal_iterator<boost::shared_ptr<int> *,std::vector<boost::shared_ptr<int>,std::allocator<boost::shared_ptr<int>>>>, #10000, #10000) '

I appended the indexer log.

If i removed the typedefs (and type the types directly), the problem is solved.
Is there a solution?

  • Attachment: parser.log
    (Size: 62.19KB, Downloaded 103 times)
Previous Topic:indexer can not deal with std::vector<boost::smart_ptr<...> >
Next Topic:Errors when attempting to build C++ project
Goto Forum:

Current Time: Fri Aug 22 19:50:03 EDT 2014

Powered by FUDForum. Page generated in 0.20609 seconds