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
 Code Inspection - Suggestion on destructors fail
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

khb
Tomato Guru

Germany
337 Posts

Posted - Apr 06 2017 :  4:46:11 PM  Show Profile  Reply with Quote
I'm using VS 2012 with VA 2212 in an MFC project and get the blue underline on destructor names, such as:
virtual ~CFoo() {}
Code Inspection suggests the option: Use '= default' and changes the code to:
virtual ~CFoo() = default;
However, this doesn't compile for me (error C2065 - undeclared identifier).
The default also gets a red wiggly underline and when I hover over it, then I am told that only =0 is allowed.

Am I doing something wrong or is this a bug?

Kind regards,
Marcus

Edited by - khb on Apr 06 2017 4:59:31 PM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 06 2017 :  6:34:37 PM  Show Profile  Reply with Quote
I was able to reproduce the problem which is that VS2012 update 5 doesn't support this C++ feature yet.

Would you prefer if fixes that aren't supported in a certain IDE wouldn't show up?

Although I'm not sure about the implementation since users can use any custom compiler, but I have put in a feature request for this:

case=105286
Go to Top of Page

khb
Tomato Guru

Germany
337 Posts

Posted - Apr 07 2017 :  12:25:12 PM  Show Profile  Reply with Quote
Well, I would prefer if non-supported features weren't suggested. I don't want to have any blue markings left after adapting everything I can. I understand that this might be difficult for custom compilers, but the VS own compiler should be correctly reflected, I think.

Kind regards,
Marcus
Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - Apr 07 2017 :  12:42:39 PM  Show Profile  Reply with Quote
Some checks are already toolset dependent. For example, you won't be offered range-base loops in VS2010. They are also not offered if you are using a later IDE, but are building with VS2010 (VS2017 project, with Platform Toolset = v100)

We'll update the "=default" check to only be active in VS2013 and later.

Whole Tomato Software
Go to Top of Page

khb
Tomato Guru

Germany
337 Posts

Posted - Apr 07 2017 :  5:55:14 PM  Show Profile  Reply with Quote
Great! Thanks!

Kind regards,
Marcus
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 26 2017 :  5:06:49 PM  Show Profile  Reply with Quote
case=105286 is fixed in build 2217.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000