Page 1 of 1

codecomplete and stl

Posted: Mon Mar 09, 2009 3:34 am
by giugio
Hy.
I'm test codelite and it's fantastic !.
My only problem now is how to use code completion on the stl container like vector,amp and they function like push_back ecc...
Thanks.

Re: codecomplete and stl

Posted: Mon Mar 09, 2009 1:00 pm
by eranif
Hi,

the code completion of STL works for the first level only - i.e. codelite fails in resolving the template arguments.

So, this should work:

Code: Select all

std::vector<std::string> v;
v. // <--- code completion will offer completion here
However this will fail:

Code: Select all

std::vector<std::string> v;
v.at(0). // <--- code completion will FAIL to understand that at(0) is actually std::string
If you dont get code completion even for what I wrote that should work, then check that:
- You have 'using namespace std;' OR
- you are using full path (e.g. std::map)
Also to check:
- do you have external symbols database attached? (should be mentioned in the status bar)
- if you do have external symbols database, please make sure it includes all the symbols from the STL, you can do this from: Tags -> Tags Management and select the active external symbols database, once it is selected it will list the paths of which it was created from.

General comment:
- make sure you mention your OS and CodeLite version (SVN or one of the binaries provided by me)

Eran

Re: codecomplete and stl

Posted: Tue Jan 29, 2013 10:56 am
by Verax
I'm also having some trouble with this.

Here's my test code:

Code: Select all

#include <queue>

using namespace std;

int main()
{
	queue<int> q;
	q.   //<----- Nothing pops up here
	return 0;
}
Code builds fine. Tried a retag of the workspace with no luck.

Also, if I attempt to use fully qualified names, I also don't see anything.

Code: Select all

#include <queue>

int main()
{
	std::   //<----- Nothing pops up here
	return 0;
}
Please advise

-----------------------------------------------------------
CodeLite 5.0.x (Custom build from trunk 2013-01-28, using included MinGW compiler)
Windows 7

Re: codecomplete and stl

Posted: Tue Jan 29, 2013 11:05 am
by eranif
wow, please don't hijack 4 years old thread... ;)
The bug that is mentioned on this thread was long ago fixed (not to mention that some of the concepts were modified since 2009)

For your problem:

It works here...so it must be a configuration problem.
Please see this thread for what to post - please create a new thread instead of this one

Eran

Re: codecomplete and stl

Posted: Tue Jan 29, 2013 11:16 am
by Verax
Will do, my apologies.

I reverted back to the offcial build (5.0.6213) and the problem is gone. It must have been something will my persona build.