Request: smart-pointers smart auto completion

General questions regarding the usage of CodeLite
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Request: smart-pointers smart auto completion

Post by eranif »

It will work if you remove the typedef to be on top of the main (dont make it innter to main)

EDIT: It appears as ctags does not parse typedef which are inner to methods

Eran
Make sure you have read the HOW TO POST thread
karnon
CodeLite Curious
Posts: 9
Joined: Wed Jul 22, 2009 11:39 am
Contact:

Re: Request: smart-pointers smart auto completion

Post by karnon »

I have the same problem with codelite 2.0, when using boost::shared_ptr without namespace "boost" , code completion will fail, e.g.
#include <boost/shared_ptr>
#include <vector>
using namespace std;
using namespace boost;
int main()
{
shared_ptr< vector<int> > x;
x-> //--------- here code completion fail
return 0;
}

However, this can be avoided by always writting "boost::" and "std::", just like:
boost::shared_ptr< std::vector<int> > x;
x-> //------it works fine now

Is is a bug????
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Request: smart-pointers smart auto completion

Post by eranif »

karnon wrote:Is is a bug????
Indeed it is a bug - it should work when with 'using namespace'

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Request: smart-pointers smart auto completion

Post by eranif »

This issues is now fixed in SVN trunk.

There was a bug that parsing the template arguments did not attempt to resolve 'vector' using any of the 'using namespace XXX' declarations - this is now fixed and working using trunk version of codelite.

BTW: You might want to place the 'using namespace boost' first, since at least using gcc4.4.0 the 'std' namespace also have a class named 'shared_ptr'
I wonder if this does not cause a conflict during compilation

Thanks for reporting this.
Eran
Make sure you have read the HOW TO POST thread
Post Reply