Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 typedef struct not recognized with inheritance

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
catod6 Posted - Aug 29 2006 : 04:51:10 AM
There is a problem with the latest version (I checked both b1446 and 1533) with typedefs.
I want to say, that this feature worked correctly in a previous version I had (b1298).

In the following example, MyClass2 is not recognized by VA-X:

class MyClass1
{
MyClass1()
{
}
};

typedef struct _MyClass2 : public MyClass1
{
_MyClass2()
{

}
} MyClass2;

If I remove the inheritance code, (i.e., ": public MyClass1") then it's ok.


I saw a reference to a similar issue here:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5072
But since a lot of my code is already written like that, I cannot change it.
10   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 27 2009 : 9:22:48 PM
case=2302 is fixed in build 1715
feline Posted - Feb 22 2007 : 1:46:39 PM
Unfortunately no progress on this yet. However I believe I have a work around fix for you. I have changed the code to read:

#define FELINE_STRUCT typedef struct

FELINE_STRUCT _MyClass2 : public MyClass1
{
public:
	_MyClass2()
	{

	}
} MyClass2;


to the compiler this is exactly the same thing, but it allows me to redefine FELINE_STRUCT so that VA see's something else.

Edit the file:

"C:\\Program Files\\Visual Assist X\\Misc\\StdAfx.h"

and add the entry:

#define FELINE_STRUCT class

at the bottom. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. There are a couple of things to watch out for though. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

Secondly when you install a new build of VA it will install the latest version of VA's StdAfx.h file, which will overwrite your changes. So long as you reapply your changes before loading the IDE then the rebuild that the installer triggers will also pick up your changes.

Hopefully this will help, and will allow you to run the current builds. I have only run a few tests on this, but so far it seems to fix the problems.
catod6 Posted - Feb 22 2007 : 11:26:48 AM
Any news regarding this case? I'm still waiting for a fix in order to upgrade.
feline Posted - Dec 04 2006 : 2:48:17 PM
Unfortunately no progress on this so far.

Is there some reason why you are deriving a structure from a class? I am aware that in C++ a class and a structure are virtually identical, so this is legal, but it seems an odd choice, and I would have thought it would confuse people.
catod6 Posted - Dec 04 2006 : 09:48:23 AM
Is there any news regarding that?
It is the only thing that stops me from upgrading...
rhummer Posted - Aug 31 2006 : 09:28:05 AM
It hasn't been marked for when it will be fixed since it went in a few hours ago.

Cases are for our internal bug tracking, so you can't see open cases. If you want to be updated you have to bug us :)
catod6 Posted - Aug 31 2006 : 07:49:38 AM
So will it be fixed for the next build?
Where can I see the open cases and be updated for changes in their status?
jpizzi Posted - Aug 31 2006 : 12:39:52 AM
As you probably expected, easy to reproduce.

case=2302
jpizzi Posted - Aug 29 2006 : 11:54:07 PM
I agree. But, why clutter this topic with a response to that topic?

[edit]
Wait. I have re-thought this. And, I have re-read the referenced topic, and understand why the message is here. Sorry about that.

Please note that the following is my personal opinion. I am not a decision-maker for WT, although I do work for them responding to questions on the forums.

I agree that not handling any legal ISO C++ construct is a bug. Taking it a step further, even if the construct or syntax is an extension to the language, if VS supports it, VA not supporting it is a bug since VA is an extension to VS. But, whether or not that bug is fixed is dependent upon the cost to fix the bug versus the number of people that will benefit from that fix.

In the referenced topic, the poster did not respond, so I assume that it was not important enough for that poster to have the bug fixed.

End of personal opinion

I will try to reproduce this in my environment. If I can reproduce it, I will enter a case. Unfortunately, I do not have time to do that at this moment. Please give me some time (on the order of 12-18 hours) to get back to it.
[/edit]
.oisyn Posted - Aug 29 2006 : 09:17:31 AM
Regarding the answer from the moderator in that other thread, I'd like to request that VA X is able to handle all legal ISO C++ constructs, not only the ones that someone thinks that should be used or is better in his opinion.

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