Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 code completion and deleted functions

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 - Jan 29 2020 : 12:15:46 PM
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
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 30 2020 : 12:51:20 PM
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

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