Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 No intellisense with forward declared type, C++
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

timleh
New Member

3 Posts

Posted - Aug 11 2009 :  5:31:04 PM  Show Profile  Reply with Quote
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?

timleh
New Member

3 Posts

Posted - Aug 11 2009 :  5:33:20 PM  Show Profile  Reply with Quote
I'm using: Version 10.5.1727.0 built 2009.06.12.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Aug 18 2009 :  1:54:38 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

timleh
New Member

3 Posts

Posted - Aug 18 2009 :  2:14:09 PM  Show Profile  Reply with Quote
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?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Aug 20 2009 :  1:06:11 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000