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 move to source file error w' templates
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hajokirchhoff
Senior Member

Germany
37 Posts

Posted - Feb 23 2013 :  10:46:32 AM  Show Profile  Reply with Quote
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

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Feb 23 2013 :  12:11:07 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=2948

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

support
Whole Tomato Software

5566 Posts

Posted - Apr 25 2013 :  2:31:01 PM  Show Profile  Reply with Quote
case=2948 is fixed in build 1936
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000