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
 enum class scope not enforced in completion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sitnduck
Senior Member

47 Posts

Posted - May 08 2023 :  10:17:20 AM  Show Profile  Reply with Quote
In C++ using an enum class:
enum class eNetUIMode
{
NORMAL,
};

When doing an assignment, it doesn't add the class name. e.g. suggestions for completion after the "=" are without the class name:
eNetUIMode ClNetUI::mp_eNetworkMode = NORMAL;

Should be:
eNetUIMode ClNetUI::mp_eNetworkMode = eNetUIMode::NORMAL;

sitnduck
Senior Member

47 Posts

Posted - May 08 2023 :  10:22:37 AM  Show Profile  Reply with Quote
Actually, it seems to work in other cases, not in this static value definition. Perhaps just this small case!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18958 Posts

Posted - May 08 2023 :  12:54:14 PM  Show Profile  Reply with Quote
What do you mean by static value definition? Using the following very simple test case, VS2022 and VA 2488.0, when I type the == and a space, to get the VA smart suggestion listbox in both if statements the class name is always part of the suggestion:

enum class SimpleEnumClassSuggest
{
	NORMAL,
	SUPER_NORMAL
};

void suggestionEnumClassItem()
{
	SimpleEnumClassSuggest localEnum;
	if(localEnum == SimpleEnumClassSuggest::SUPER_NORMAL) { }
	static SimpleEnumClassSuggest staticLocalEnum;
	if(staticLocalEnum == SimpleEnumClassSuggest::NORMAL) { }
}

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