Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Renaming a type misses 'using' declarations

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
dstaikos Posted - Nov 25 2010 : 01:29:05 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Nov 29 2010 : 7:00:38 PM
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
dstaikos Posted - Nov 28 2010 : 9:44:16 PM
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
accord Posted - Nov 25 2010 : 04:01:43 AM
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?

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