Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Create Method Implementations issue

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
bta Posted - Mar 17 2017 : 11:24:25 AM
Hi,

it seems that the Create Method Implementations functionality can't handle the fact that a constructor is defaulted in the cpp file.
It keeps on proposing to create an implementation for the constructor.

So considering following sample code:

// header
class MyClass
   {
   public:
      MyClass();
      ~MyClass() = default;

      void foo();
   };

// cpp file
MyClass::MyClass() = default;

void MyClass::foo()
   {
   }


Create Method Implementations... proposes to create an implementation for the constructor, while there is an implementation in the cpp file.
It nicely sees that the destructor and foo() are already fine.

Replacing the = default by an empty body causes the implementation of the constructor to be seen.
Similar issue for the destructor: only in the header the = default is seen and treated correctly.

Bart

PS. working with Makefile C++ project.

VA_X.dll file version 10.9.2210.0 built 2017.03.08
DevEnv.exe version 14.0.25420.1 Professional
msenv.dll version 14.0.25431.1
Comctl32.dll version 6.10.7601.18837
Windows Server 2008 R2 6.1 Build 7601 Service Pack 1 (remote)
36 processors (x86-64, WOW64)
Language info: 1252, 0x409
2   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Feb 05 2019 : 6:26:02 PM
case=104654 is fixed in build 2316.
feline Posted - Mar 17 2017 : 3:00:21 PM
I am seeing the same effect here. Thank you for the clear description.

case=104654

Interestingly, VS2015 and VS2017 both offer to create the constructor implementation with this sample code, so it's not just VA getting a little confused here.

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