Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 No intellisense with forward declared type, C++

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
timleh Posted - Aug 11 2009 : 5:31:04 PM
class A; //forward declaration of class defined elsewhere, happens to be in same library in my case

class B
{
public:
A * myA;
};

void main(void)
{
B b;

b.myA-> /* no intellisense here */
}

I understand that the compiler doesn't know the full definition of "A" as it's compiling B, but wouldn't you be able to look for the symbol "A" in your cache after you'd parsed everything? If there were multiple "A" definitions, perhaps provide a choice and then a member list after the programmer picked which A they were using here?
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 20 2009 : 1:06:11 PM
I am not sure what debug information to ask for at the moment. The first test is to see what Alt-G and VA View make of the forward declared type. If both fail then VA knows nothing of the type, so you are most unlikely to get any intellisense from VA. If this is the case, the details of the solution start to matter, since if VA has no way of finding the file where this type is declared is is never going to parse the file.
timleh Posted - Aug 18 2009 : 2:14:09 PM
Hmmm... I pulled it up in VA View and see all members as expected. I then went to a method defined in a .cpp and tried ->, got the full list of members. Then I tried in an inline method defined in the .h file, -> worked. And just in case using the VA View nudged some in-memory cache in the right way to make it all work, I closed VS2008 and reopened it. -> still works in both places after that.

I guess I'll withdraw the question for now. If I see it again, is there any debugging info I should enable that would be useful for you?
feline Posted - Aug 18 2009 : 1:54:38 PM
Apologies for the delay in getting back to you about this.

In this code, is "A" coloured as a type by VA?

If you show VA View, then place keyboard focus back into the editor, and now hover the mouse over the type "A" is anything, or preferably the correct information displayed?

If VA knows about the type A then it should be able to help you here, but if it does not know about this type then it won't be able to help, and we have to work out why it does not know about the type A.
timleh Posted - Aug 11 2009 : 5:33:20 PM
I'm using: Version 10.5.1727.0 built 2009.06.12.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000