Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 refactor move to source file error w' templates

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
hajokirchhoff Posted - Feb 23 2013 : 10:46:32 AM
Consider this class:
template <typename A, typename BDefault=A>
class foo
{
   void bar(A a, B b) {}
};

When I select "refactor, move implementation to source code", VAssistX generates this:
template <typename A, typename BDefault=A>
void foo::bar(A a, B b)
{
}

which is an error (C4519: default template arguments are only allowed on a class template.

"move implementation" must strip any default template argument from the template definition.

Correct is this, without "=A":
template <typename A, typename BDefault>
void foo::bar(A a, B b)
{
}

Regards, Hajo
2   L A T E S T    R E P L I E S    (Newest First)
support Posted - Apr 25 2013 : 2:31:01 PM
case=2948 is fixed in build 1936
feline Posted - Feb 23 2013 : 12:11:07 PM
I am seeing the same effect here. Thank you for the clear description.

case=2948

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