Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Refactor:MITS vanishes in this case
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Aug 11 2006 :  10:18:50 AM  Show Profile  Reply with Quote
code:

struct COuter
{
struct CLayout { };
CLayout const & GetLayout()
{
}
};

Refactor does not offer "Move Implementation to source" on GetLayout.
When return type is changed to CLayout & (or CLayout), it is available.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 13 2006 :  4:19:51 PM  Show Profile  Reply with Quote
my first reaction was "you cannot do that, can you?" i am familiar with doing this with pointers, but i dont thing i have ever seen it done with a reference before. still it compiles, and makes sense when you think about it.

remove the const and Move Implementation to Source File becomes available.

case=2058

zen is the art of being at one with the two'ness
Go to Top of Page

peterchen
Tomato Guru

126 Posts

Posted - Aug 14 2006 :  05:38:41 AM  Show Profile  Reply with Quote
It's legal to the best of my knowledge (And I do it very frequently to group complex settings)
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 14 2006 :  9:58:44 PM  Show Profile  Reply with Quote
Likely, it is the placement of the const that is confusing VA, not the existence of it. Most often, I have seen the syntax done as follows:
struct COuter
{
struct CLayout { };
   const CLayout& GetLayout()
   {
   }
};

Joe Pizzi
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Aug 27 2006 :  7:17:06 PM  Show Profile  Reply with Quote
Fixed in build 1533.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000