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
 Renaming a type misses 'using' declarations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dstaikos
New Member

Greece
4 Posts

Posted - Nov 25 2010 :  01:29:05 AM  Show Profile  Reply with Quote
I declare an enum similar to this: typedef enum {a,b,c} MYTYPE;
The type is inside a C++ namespace.
The namespace name is controlled with a #define:
#define PROJECT_NAMESPACE MyNamespace
In several source files I have the following:
using PROJECT_NAMESPACE::MYTYPE;
If I rename MYTYPE using VAX then all the 'using' statements are missed.
Dimitris

The problem with quick & dirty is that the dirty remains long after the quick has been forgotten.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 25 2010 :  04:01:43 AM  Show Profile  Reply with Quote
I wasn't able to reproduce the problem using the following simple code snippet with VA 1837:

namespace MyNamespace
{
	typedef enum {a,b,c} MYTYPE;
}

#define PROJECT_NAMESPACE MyNamespace
using PROJECT_NAMESPACE::MYTYPE;


Can you please try whether you can reproduce the effect using this snippet?
Go to Top of Page

dstaikos
New Member

Greece
4 Posts

Posted - Nov 28 2010 :  9:44:16 PM  Show Profile  Reply with Quote
Sorry, I didn't provide adequate description.
What I described happens when I have an enum with a type specification:



VAX seems to be having a little trouble with the type specification. If I enter a using statement for the whole namespace, then VAX considers the enum type name invalid and underlines it:



If I enter "using PROJECT_NAMESPACE::MYTYPE;" the VAX treats the type name as legal and does not underline it (as in the first picture).

My problem is not just aesthetic. I use a very central enum of unsigned __int64 because I don't want to use #defines and right now VAX forces me to write a using MYNAMESPACE::MYTYPE on every source file, otherwise I get a screen full of red underlines.

Warm Regards
Dimitris Staikos

The problem with quick & dirty is that the dirty remains long after the quick has been forgotten.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 29 2010 :  7:00:38 PM  Show Profile  Reply with Quote
It seems VA doesn't handle well "derived", typedefed enums. It causes both problem and I have put in a bug report for these:

case=52711

Thank you for the clear description and the screenshots

Edited by - accord on Nov 29 2010 7:01:53 PM
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