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
 VAOutline protected-using-public level error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

superzmy
Senior Member

China
34 Posts

Posted - Dec 19 2024 :  10:40:03 PM  Show Profile  Reply with Quote
class X
{
protected:
using A = void*;
public:
using B = int;
....
};

Outline public is son of protected

feline
Whole Tomato Software

United Kingdom
19109 Posts

Posted - Dec 20 2024 :  10:08:58 AM  Show Profile  Reply with Quote
Interesting, and surprising. Thank you for the very clear sample code, I have put in a bug report for this:

case=165329

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

superzmy
Senior Member

China
34 Posts

Posted - Feb 11 2025 :  01:29:10 AM  Show Profile  Reply with Quote
Can I see the bug is fixed before I die
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19109 Posts

Posted - Feb 11 2025 :  07:56:04 AM  Show Profile  Reply with Quote
As a partial work around, you could try using a macro for the using statement, so going from:

class TestOutlineWithUsingInClass
{
protected:
	using A = void*;
public:
	using B = int;
};


to:

#define TYPE_A using A = void*
	
class TestOutlineWithUsingInClass
{
protected:
	TYPE_A;
public:
	using B = int;
};

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

superzmy
Senior Member

China
34 Posts

Posted - Feb 13 2025 :  9:51:18 PM  Show Profile  Reply with Quote
#define $$()
struct
{
protected:
using A = void *;
$$();
public:
using B = void *;
B a;
};

I will be killed by anyohter who read the code.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19109 Posts

Posted - Feb 14 2025 :  07:43:23 AM  Show Profile  Reply with Quote
That is terrible. Is that really better than ignoring the problem for now?

My first thought was to place the using statement into a namespace, on its own, and do a "using namespace" inside the struct, but that isn't compiling, which surprised me.

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:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000