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 completion and deleted functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bta
Ketchup Master

Belgium
57 Posts

Posted - Jan 29 2020 :  12:15:46 PM  Show Profile  Reply with Quote
In c++ you have the possibility to explicitly delete functions.
For more info see: https://en.cppreference.com/w/cpp/language/function
Scroll down to the Function definition paragraph.

The syntax is:
void foo() = delete;

and what you basically do is explicitly tell that the function is not available.
In our codebase we sometimes use this to 'document' that we thought of a certain function, but explicitly do not want it to be present.

As the function is deleted, ideally you do not want code completion to suggest it.


namespace OMTLS
   {
   void foo() {}
   void foo2() = delete;
   }


int main()
   {
   OMTLS::foo();
   //OMTLS::foo2();   // foo2 should not be suggested by code completion...
   return 0;
   }



Environment:
VA_X.dll file version 10.9.2353.0 built 2019.11.07
DevEnv.exe version 16.2.29123.88 Professional


Bart

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Jan 30 2020 :  12:51:20 PM  Show Profile  Reply with Quote
Interesting, I was not aware of this feature.

What do you have:

VA Options -> Enhanced Listboxes -> Source of C/C++ content: Visual Assist OR Default Intellisense

set to? If you set this to "Default Intellisense" then the deleted items should not be listed in listboxes. Obviously this won't help if you have disabled the IDE intellisense database for some reason.

I have put in a bug report for VA suggesting these member functions:

case=141826

zen is the art of being at one with the two'ness
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