Early Access Program

ReSharper C++ 2021.3 EAP: Coding Assistance Features

The 2021.3 major update is around the corner, and we’re almost ready for the upcoming release. In today’s post, we’d like to share the last batch of new features that help you edit code.

As usual, the EAP build is free to use and available for download from our website or via the Toolbox App.

DOWNLOAD RESHARPER C++ 2021.3 EAP

With ReSharper C++ 2021.3, you can easily generate boilerplate code for aggregate initialization using C++20 designated initializers. Just select the corresponding item from the completion list and ReSharper C++ will automatically insert the designators for all the class fields. After that, you just need to provide the initial values. Similarly to other code generation features, Tab will navigate to the next field.
Code completion for C++20 designated initializers

Previously, in order to generate a new Doxygen comment, you had to use the Document action (either via the Alt+Enter menu, or with the Ctrl-/ shortcut). We’ve made this task easier – now you can create a new documentation stub simply by typing /// before the entity you want to document. This feature works before all functions, namespaces, classes, macros, type aliases, enums, and enumerators.
Type /// to generate a new Doxygen comment

When you press Enter inside a single-line comment, ReSharper C++ will automatically extend the comment to the next line. If you want to start an empty new line instead, just press Enter at the end of the comment.
Extend the comment to the next line

The Change Signature refactoring now lets you easily control the C++17 [[nodiscard]] attribute, which indicates that the function caller should use the function return value.
Mark a function with [[nodiscard]]

That’s it for today! We’d like to thank everyone who has tried our EAP builds and shared their feedback with us. You can report any bugs or suggest ideas here in the comments, on Twitter, or in our tracker.

DOWNLOAD RESHARPER C++ 2021.3 EAP

Your ReSharper C++ team
JetBrains
The Drive to Develop

image description