ReSharper C++ 2020.1 EAP: Convert to Scoped Enum Refactoring and Quick Documentation Comments
This EAP build takes us within one step of the first major release of the year! It primarily includes bug fixes but also introduces a new refactoring and the Document editor action. Let’s take a closer look at these new features:
As usual, you can download the new EAP build from our website or through the Toolbox App.
Convert to Scoped Enum
enum refactoring helps you convert a C-style enumeration declaration into a C++11 scoped enumeration. To invoke it, place the caret on an enumeration and select Convert to Scoped Enum from the Refactor This menu, or choose ReSharper | Refactor | Convert | Unscoped Enum to Scoped Enum from the main menu:
The refactoring will update all the enumeration declarations and qualify the enumerator references. Moreover, if a value of the enumeration type is implicitly cast to an integral type, ReSharper C++ will warn you about this and automatically insert a
static_cast to the corresponding type:
Please note that in rare cases, some of the implicit casts could be missed by the refactoring. In these cases, you’ll get a compilation error after the refactoring is complete. As with the rest of the C++ refactorings, Convert to Scoped Enum will warn you about potential enumeration usages in dependent code, but it will not automatically update them.
“Document” editor action
Up until now, you’ve been able to use the Document context action to generate a documentation comment for a code element, but the action needed to be invoked from the Alt+Enter context menu with the caret placed on the element’s name.
In this EAP build, we’ve introduced a more convenient way to add a comment stub – the new ReSharper | Edit | Document editor action. This action can be invoked with a shortcut (Ctrl+/ by default in the Visual Studio keymap), and it’s available anywhere above and inside a top-level code element. As with the context action, you can customize the comment stub in the Template Explorer tool window by changing the doc live template.
Check out our issue tracker for the full list of issues we’ve fixed in this EAP build.
Your ReSharper C++ team
The Drive to Develop
Subscribe to Blog updates
ReSharper C++ 2023.3 EAP: HLSL Updates and Completion in Inactive Code
The new EAP build is here with updates for HLSL support, code completion inside inactive preprocessor branches, and a new inlay hint for forwarding references.
ReSharper C++ 2023.3 EAP: Clang 17, Updated Attributes
The new EAP build is here with the upgraded bundled clang-format and clang-tidy binaries, a new action to generate a destructor, support for various clang intrinsics, and other updates.
The ReSharper C++ 2023.3 EAP Is Now Open
Our 2023.3 Early Access Program is now open! Read our first EAP digest to discover the latest enhancements to ReSharper C++.