Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 bug with forward declared enum

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
supermassive Posted - Jul 05 2013 : 05:29:38 AM


When the first line with forward declared enum is uncommented methods in class become drawn in pink color and underlined as errors. Is it a bug?

10   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Nov 18 2013 : 3:09:10 PM
case=75894 is fixed in build 2007
feline Posted - Aug 02 2013 : 3:37:11 PM
I am not sure what I was thinking when I wrote the class like that, it must have been a bad day. Thank you for the fix.

I am seeing the problems with the function colouring and VA understanding the class after the enum:

case=75894
supermassive Posted - Aug 02 2013 : 12:36:34 AM
Don't know how to attach something here, so the corrected enumTest.h is below:

1)no brackets: class testClassAfterEnumForwardDeclare() -> class testClassAfterEnumForwardDeclare
2)semicolon at the end: } -> };

-------------------------------
#pragma once
enum testEnumForwardDeclare : int;
class testClassAfterEnumForwardDeclare
{
public:
void afterMemberOne();
void afterMemberTwo(int nParam);
};
-------------------------------

Such variant compiles and has the same problems as I mentioned above. Just play with commenting/uncommenting forward declaration and see how it affects fonts in class declaration.

Thanks!

feline Posted - Aug 01 2013 : 11:23:43 AM
Apologies for that, my mistake, please try this link instead:

http://forum.wholetomato.com/colin/forumimages/topic11444_enumForwardDeclareTest.zip

I have double checked the link actually works this time
supermassive Posted - Jul 31 2013 : 10:54:01 PM
I couldn't download archive, this error appears:
"File not found
The file you requested cannot be found on our site. "
feline Posted - Jul 31 2013 : 4:22:33 PM
If you have the time, can you please download this simple, default VS2012 console application. I have added a header file, and added a sample enum forward declare and class, based on your posting, but it does not compile for me, using VS2012 Update 3:

http://forum.wholetomato.com/colin/forumimages/topic11444_enumForwardDeclareTest.7z

Since your forward declared enum compiles, you must be doing something differently to me, which might be a factor, so it would be good to know what the difference is.
supermassive Posted - Jul 31 2013 : 02:33:53 AM
Actually it is not about underlining. When I put forward declared enum before class declaration colors of methods in class change to pink(or purple) and I can't navigate to theirs definition from header using Alt+G(well, navigation works in given example, but not in my complex project).
It seems having forward declared enum changes the way the subsequent class declaration is interpreted.
feline Posted - Jul 08 2013 : 1:13:57 PM
I am not seeing this underlining here. Can you please try disabling VA, via:

VAssistX -> Enable/Disable Visual Assist X

and see if the underlining disappears or not? VA should not be underlining invalid C++ code in VS2012, since the IDE does this, so this underlining should be coming from VS2012. But the IDE should not be underlining code that compiles.
supermassive Posted - Jul 05 2013 : 9:52:14 PM
Sorry for not including this info in the first post.

VA Build 1940, VS2012 upd 2, C++.

Both variants were in .h file and compiled successfully.
feline Posted - Jul 05 2013 : 2:26:54 PM
Which IDE and version of VA are you using?

Which language is this? I am guessing C++, but using this forward declaration of the enum is not compiling for me, in VS2010. Does this compile for you?

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