Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 C++ Change Signature leaves abtract override

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
armin Posted - Oct 20 2022 : 11:04:56 AM
class ClassA {
public:
virtual ~ClassA() = default;

virtual auto Foo(int num) const -> int abstract;
};

class ClassB : public ClassA {
public:
auto Foo(int num) const -> int override:
};

====>> changing signature via "Change Signature" -> Foo(..., bool on) // adding another parameter

class ClassA {
public:
virtual ~ClassA() = default;

virtual auto Foo(int num, bool on) const -> int abstract;
};

class ClassB : public ClassA {
public:
auto Foo(int num, bool on) const -> int abstract override // <<----- abstract AND override! only override is correct
};


I noticed this behavior since ages.

System info:
VA_X.dll file version 10.9.2458.0 built 2022.07.29
DevEnv.exe version 16.11.32929.386 Enterprise
msenv.dll version 16.0.32413.511
Comctl32.dll version 6.10.19041.1110
Windows 10 10.0 21H2 Build 19044.2130
8 processors (x86-64, WOW64)
Language info: 1252, 0x807


3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 16 2022 : 09:12:43 AM
Thank you for the update, yes, it does indeed seem that abstract is a Microsoft specific keyword, but the meaning of the code is clear, which is what matters.
armin Posted - Nov 16 2022 : 08:36:20 AM
We use MSVC (Microsoft Visual C++ compiler) v142. The language we use is ISO c++ 17 Standard C++ and sometimes also C++/CLI, but there is no difference what the behavior concerns.
"abstract" seems to be a Microsoft specific keyword.
If I replace abstract by = 0, it works perfectly, on base or derived class.
If I trigger Change Signature on the child class member the "abstract" on the base member will disappear, the rest of the signatures is correct.
feline Posted - Nov 14 2022 : 10:32:20 AM
Apologies for the slow reply. I am seeing the same problem here, thank you for the very clear example:

case=148821

This might be a strange question, but what language are you compiling this as? Actual C++ or C++/CLI, or something else? This compile quite happily for me as C++, but "abstract" isn't a C++ keyword.

For the bug, if you trigger Change Signature in the child class, "ClassB", do you still see the problem? I don't see the bug when doing this, only when triggering Change Signature in the base class.

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