Wiki

Case Status
Log In

Wiki

 
Whole Tomato Software - Home
  • RSS Feed

Convert Unscoped Enum to Scoped Enum

In C++11, you have the option to use Scoped Enumerators also called Enum classes which avoid some compilation errors when identifying enum values.

With Visual Assist, you can convert from Unscoped Enum to Scoped Enum using Alt+Shift+Q right after the enum name or definition on an enum declaration.

The Convert Unscoped Enum to Scoped Enum command displays a dialog where you can select the references you want to update. The dialog displays the results of searching for instances of the enumerator values defined in the selected enum.

After selecting the references you want to update, click OK to convert your enumerator to an enum class.