Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX misses class defined enum in "create impl"

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
BillyONeal Posted - Jun 10 2011 : 11:37:32 PM
Hello, Whole Tomato. :)

Consider the following:


class Example
{
    enum Signs
    {
        POSITIVE,
        NEGATIVE,
        ZERO,
        UNKNOWN
    };
public:
    Signs GetSign() const;
};


If you right click on "GetSign", and select "Refactor (VA X)" -> "Create Implementation", VA X will create this function:


Signs Example::GetSign() const
{
    
}


This will not compile, because the "Signs" enum is not known outside of the class. It should instead produce


Example::Signs Example::GetSign() const
{
}


Thanks!
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 13 2011 : 1:24:16 PM
Interesting. It is possible namespaces or macros could be a factor here. Both of these have been known to confuse our parser now and then, and once the parser is confused things like this can happen.
BillyONeal Posted - Jun 13 2011 : 1:13:03 PM
Hmm... interesting. Only happens with one of my projects. Unfortunately I can't send you guys the project -- the code is not all mine -- but if I find a concrete set of steps to repro this I'll be back. :)

Billy3
feline Posted - Jun 11 2011 : 09:56:07 AM
Which IDE and version of VA are you using?

I am getting the correct return type for your example code using VA 1850 and VS2008, testing in C++.

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