Author |
Topic |
|
armin
New Member
Switzerland
2 Posts |
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
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|
armin
New Member
Switzerland
2 Posts |
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
Whole Tomato Software
United Kingdom
19020 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|