Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » stl::list breaking CDT features?
stl::list breaking CDT features? [message #211841] Thu, 13 March 2008 10:06 Go to next message
Eclipse UserFriend
Originally posted by: me.alienemperor.de

Hi,

we recently introduced the stl::list structure in our project after
searching for a reliable simple list implementation for some time[1].

However we noticed that

1. The Ctrl+Space completion feature does not work on stl::list
functions and iterators.

list<cExample> lExample;
list<cExample>::iterator test;
test = lExample.begin();
test->

This is the moment where I expected Ctrl+Space to give me an overview of
the member functions of cExample. It doesn't.

2. Call Hierarchy doesn't recognize the usage of member functions when
dereferncing an iterator. Consider my example in (1.).
When I write something like

test->destroy();

where destroy() is a member function of cExample, the Call Hierarchy
completely ignores that call.


My Question is, is there a way around this, and if not, can someone
suggest another list implementation that will not break the CDT's features?

Regards
Philip


[1]: We are currently discussing implementing our own list structure but
as we are somewhat new to C++ we had problems with the fact that we want
one list structure to provide multiple lists of different element types.
Re: stl::list breaking CDT features? [message #211851 is a reply to message #211841] Thu, 13 March 2008 10:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: me.alienemperor.de

Philip Mueller schrieb:
> 2. Call Hierarchy doesn't recognize the usage of member functions when
> dereferncing an iterator.

I have to take that back. Rebuilding the index fixed it.
The other point remains however.

Regards
Philip
Re: stl::list breaking CDT features? [message #211858 is a reply to message #211841] Thu, 13 March 2008 10:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fwein.lse.eei.uni-erlangen.de

Philip Mueller wrote:

> 1. The Ctrl+Space completion feature does not work on stl::list
> functions and iterators.

You have to add the stl stuff to the index via
Project -> Properties -> C/C++ General -> Path and symbols.

Take care that it ends up in you C++ part and not in Assembly.

If you have problems with the indexer:
-> add problem annotation
Window -> Preferences ... -> C/C++ -> Editor -> Hovers ->
enable editor problem annotation
-> in case rebuild your index via project properties ...

IMHO in newest CDT 4.0.3 the indexer is improved again.

Fabian
Re: stl::list breaking CDT features? [message #211892 is a reply to message #211858] Thu, 13 March 2008 17:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: me.alienemperor.de

Thanks for your response Fabian,

however, it still doesn't work.

Fabian Wein schrieb:
> Philip Mueller wrote:
>
>> 1. The Ctrl+Space completion feature does not work on stl::list
>> functions and iterators.
>
> You have to add the stl stuff to the index via
> Project -> Properties -> C/C++ General -> Path and symbols.
My "mingw/include/c++/3.4.5" Folder is already in the "Paths and Symbols
-> Includes -> GNU C++" list.

> If you have problems with the indexer:
> -> add problem annotation
> Window -> Preferences ... -> C/C++ -> Editor -> Hovers ->
> enable editor problem annotation
What exactly does that do? I didn't notice any difference after
activating it.

> IMHO in newest CDT 4.0.3 the indexer is improved again.
Unfortunately, I am already using 4.0.3.

Regards
Philip
Re: stl::list breaking CDT features? [message #211899 is a reply to message #211892] Thu, 13 March 2008 18:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: me.alienemperor.de

Philip Mueller schrieb:
> My "mingw/include/c++/3.4.5" Folder is already in the "Paths and Symbols
> -> Includes -> GNU C++" list.
....and that's where the header "list" resides. That's the one I included
to get access to the stl::list.

Regards
Philip
Re: stl::list breaking CDT features? [solved] [message #211952 is a reply to message #211841] Fri, 14 March 2008 07:36 Go to previous message
Eclipse UserFriend
Originally posted by: me.alienemperor.de

Philip Mueller schrieb:
> 1. The Ctrl+Space completion feature does not work on stl::list
> functions and iterators.
A simple "using namespace std;" solved this.

> 2. Call Hierarchy doesn't recognize the usage of member functions when
> dereferncing an iterator.

Solved through a rebuild of the index, although I don't get why that was
necessary.

Regards
Philip
Previous Topic:Declaration/Reference Search Not Working
Next Topic:Relaunch gdbserver target does not reload elf?
Goto Forum:
  


Current Time: Tue Jul 22 12:10:04 EDT 2025

Powered by FUDForum. Page generated in 0.39179 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top