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
 Feature Requests
 Eliminate forward declaration / use another symbol
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 14 2023 :  02:04:54 AM  Show Profile  Reply with Quote
Suppose you have

class Foo;

class Foo1
{
...
private 
  Foo *pUseFoo;
};

class Foo2
{
...
private 
  Foo *pUseFoo;
};

...

class Foo
{
...
};


I see the forward declaration of the class in the method list!
Why? It isn't so useful. When I want to get to class Foo I need to select the second entry of the method list. Mostly I missed it.

This is the same for function declarations...

Solutions:
- Use another different symbol
- Use an option to filter it
- Set a semicolon behind the forward declaration and periods for the definition. (or similar)

Just my 2 cents.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 14 2023 :  06:12:24 AM  Show Profile  Reply with Quote
I have edited the code slightly, to make sure it compiles, so I have a valid test here. I am not seeing this, the forward declaration is not being shown for me. I have attached screen shots of what I am seeing, along with my Alt-M list options for clarity, using VS2022 and VA 2491.0






zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 14 2023 :  06:53:01 AM  Show Profile  Reply with Quote
The first entry brings me to the forward declaration CDlgJobEditorSheet.
The second to the class.




Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 14 2023 :  09:33:40 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

It could be the test case I was using was to simple. Or we could be running into something else here.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 19 2023 :  04:19:28 AM  Show Profile  Reply with Quote
I am using VS2022. I try to create a "minimum repro test case".

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jul 19 2023 :  10:02:36 AM  Show Profile  Reply with Quote
Found the "problem", which is fairly obvious when you know what is going on. Forward declares are NOT shown in the Alt-M list if you are testing in a cpp file, but they ARE shown if you are testing in a header file. It never occurred to me that the file extension would matter, but I ran into this when running some more tests on this.

It turns out this has come up once before, so I have added this vote and information to the case:

case=87550

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 20 2023 :  08:18:31 AM  Show Profile  Reply with Quote
Perfect. Thanks for your feedback.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

Edited by - xMRi on Jul 20 2023 08:32:00 AM
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