Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Unnamed enum in a namespace

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
Lio Posted - Aug 25 2009 : 9:15:59 PM
I have a namespace that just has an enum in it, the enum is not named, for example:

namespace MYNAMESPACE
{
enum
{
ENUMVAL_1=0,
ENUMVAL_2,
ENUMVAL_3,
};
};

In a cpp file i am 'using namespace MYNAMESPACE', when I hover over one the enum values being used (eg case ENUMVAL_2:) I get:
enum MYNAMESPACE::__unnamed_0611::ENUMVAL_2 = 1
in the tooltip, but I can't alt-g on it... I can, however, right click and 'Go To Definition'.

Thankyou in advance,
Lio

PS now using build 1731 but it also definitely occurred in 1727
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Aug 28 2009 : 6:47:44 PM
Strange that you got different tooltip, but the most important thing is that alt+g worked.
Is there any chance of getting a copy of these two files, the cpp and .h, so I can try and reproduce the problem here? It would only be used for testing this problem, and would be kept private.
I understand this is often not possible, but it is worth asking since this would be the easiest way to look into this problem.
Lio Posted - Aug 27 2009 : 02:32:33 AM
After creating a completely new win32 project and putting the code in the header/cpp it took a minute to get the hover to work (not sure if it was parsing or what?) but I got this:



Alt-g (goto) worked fine though...

For reference (Visual Studio 2005)
VA_X.dll file version 10.5.1731.0 built 2009.08.19
DevEnv.exe version 8.0.50727.762
msenv.dll version 8.0.50727.762
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.5512
Windows XP 5.1 Build 2600 Service Pack 3
4 processors (x86)
accord Posted - Aug 26 2009 : 5:16:17 PM
Can you please try creating a new win32 test project and paste your example into the header file:

namespace MYNAMESPACE
{
    enum
    {
        ENUMVAL_1=0,
        ENUMVAL_2,
        ENUMVAL_3,
    };
};

then this into the cpp file:

using namespace MYNAMESPACE;

void func()
{
    ENUMVAL_2;
}

I'm wondering whether this will show up in a "clean" environment. I tried this myself, but goto works for me, and I got this tooltip:



(By the cpp and h file I meant the "main" one with the winmain function and the corresponding header)

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