Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1619: type coloring when using with cv in < >

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
.oisyn Posted - Nov 26 2007 : 5:57:44 PM
First I'd like to suggest to increase the number of characters in the topictitle, because I'm always having difficulties expressing the problem

The problem is, whenever you use a cv-qualified typedef-id as a template argument or cast destination (that is, whenever it is expressed between angle brackets), VA X decides to color ALL uses of that type in that sourcefile as if it where a variable. This only applies to typedef identifiers, not to the actual user defined types like class names. And also only if you put the cv-qualifiers in front of the type.

struct MyType { };
MyType * ptr = static_cast<MyType*>(0);
const MyType * ptr = static_cast<const MyType*>(0);

typedef MyType MyAlias;
MyAlias * ptr = static_cast<MyAlias*>(0);
const MyAlias * ptr = static_cast<MyAlias const*>(0);
const MyAlias * ptr = static_cast<const MyAlias*>(0); // culprit


The last line makes all occurences of 'MyAlias' be colored like variables. If you remove that last line, it is colored like a type as it should. When using a type directly instead of through a typedef, like in the MyType example, all is fine.

Naturally it also applies when you use volatile or const volatile.
6   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jul 14 2008 : 2:52:05 PM
case=2352 is fixed in build 1645
case=17359 is fixed in build 1645
feline Posted - Jun 05 2008 : 11:23:09 AM
I am seeing the same effect here. Thank you for the clear description. I have put in a new bug for this regression:

case=17359

And I have increased the priority on case=2352 for you which will hopefully help. It is possible the fix for case=17359 will fix both problems, but I really don't know if it will or not.
.oisyn Posted - Jun 05 2008 : 07:16:54 AM
Move that class definition to a header and you'll notice the bug . Also, it applies to incomplete types in the same sourcefile (if you remove the braces behind the definition of CTestClassInAngleBrackets you'll see the bug appear as well)
feline Posted - Jun 03 2008 : 09:14:47 AM
If this is getting worse then that is definitely a problem. What sort of code are you seeing a problem with? I have just tried this simple example:

class CTestClassInAngleBrackets { };

static void testGeneralCode()
{
	std::vector<const CTestClassInAngleBrackets *> testVec;
}


and for me the colouring is correct.
.oisyn Posted - Jun 03 2008 : 06:47:46 AM
This is a friendly reminder that I'm still seeing this in build 1640
However, it doesn't seem to be limited to typedefs anymore - it now applies to direct types as well, which is pretty annoying as const types between angle brackets (for casting and template parameters) are pretty common.
feline Posted - Nov 27 2007 : 09:09:01 AM
I thought I recognised this. I believe this is:

case=2352

turning up in a slightly different context.

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