Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » indexer can not deal with std::vector<boost::smart_ptr<...> >
indexer can not deal with std::vector<boost::smart_ptr<...> > [message #857571] Thu, 26 April 2012 13:07 Go to next message
Nathan Hüsken is currently offline Nathan Hüsken
Messages: 27
Registered: November 2010
Junior Member
Hey,

I have an object:

std::vector<boost::smart_ptr<MyType> > myObjects;

When I do:
myObjects[0]->|

Autocompletion does not compete the members of MyType, and when I write them I am told that the function can not be resolved.

But for this object:
boost::smart_ptr<MyType> myObject;

it works, and also for this object:
std::vector<MyType> myObjects;

What could this be?
Thanks!
Nathan
Re: indexer can not deal with std::vector<boost::smart_ptr<...> > [message #857579 is a reply to message #857571] Thu, 26 April 2012 13:18 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny Shifrin
Messages: 201
Registered: July 2009
Senior Member
Do you have unresolved includes in your file? If you believe that relevant header include (for boost::smart_ptr) is resolved, than you should open a bug with all relevant details. Also you can generate indexer log for this file, maybe it could give a clue for this issue.

Thanks,
Yevgeny
Re: indexer can not deal with std::vector<boost::smart_ptr<...> > [message #858677 is a reply to message #857579] Fri, 27 April 2012 04:44 Go to previous messageGo to next message
Nathan Hüsken is currently offline Nathan Hüsken
Messages: 27
Registered: November 2010
Junior Member
Hey,

I did the following test. I made a file Test.cpp:
#include <vector>
#include <boost/smart_ptr.hpp>

class Test {
	int function();
};

void main() {
	std::vector<boost::shared_ptr<Test> > vp_test;
	vp_test[0]->|
}


When I put this file into a new project, autocompletion works!
When I put this file into my existing project ... autocompletion does not work Sad (also no unresolved symbols or anything is shown in that file).
The include directories in Paths and Symbols are the same. What else could be the difference?

Thanks!
Nathan
Re: indexer can not deal with std::vector<boost::smart_ptr<...> > [message #858904 is a reply to message #858677] Fri, 27 April 2012 07:01 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny Shifrin
Messages: 201
Registered: July 2009
Senior Member
I am not really sure Sad

What is the indexing update policy in your project? Did you you try re-index your project (or at least this file)?

You can also generate parser log for your file, it may help figuring the cause for this behavior ...
Re: indexer can not deal with std::vector<boost::smart_ptr<...> > [message #868720 is a reply to message #858904] Wed, 02 May 2012 08:50 Go to previous message
Nathan Hüsken is currently offline Nathan Hüsken
Messages: 27
Registered: November 2010
Junior Member
Mmh, I recreated the project and the problems vanished. Now I have completely different problems with the indexer Smile, but I will start a new thread.
Previous Topic:header include path order
Next Topic:Indexer problem with typedef for iterator and std::vector::insert
Goto Forum:
  


Current Time: Fri Jul 25 11:24:46 EDT 2014

Powered by FUDForum. Page generated in 0.02552 seconds