Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Extract Function fails on template expression

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
legalize Posted - Jun 24 2014 : 12:24:19 AM

template <typename T>
T add3(T a, T b)
{
    // #TEST#: EXF19 Extract Function on expression
    // #TEST#: EXF20 Extract Function on statement
    return a + b;
}

EXF19 and EXF20 fail and introduce invalid code:

T MyMethod(T a, T b)
{
    return a + b;
}

template <typename T>
T add3(T a, T b)
{
    // #TEST#: EXF19 Extract Function on expression
    // #TEST#: EXF20 Extract Function on statement
    return MyMethod(a, b);
}

The type of the values in the expression are template types and therefore the extracted function needs to be a template function.
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jun 25 2014 : 5:06:27 PM
I am seeing the same problem here. Thank you for the clear description.

case=4369

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