ReSharper C++ 2021.3: Support for Visual Studio 2022, Unreal Engine File Templates, New C++20 and C Features
Read this post in other languages:
ReSharper C++ 2021.3 is now available!
Update to this latest version, or start a free 30-day trial today: the brand new build is available on our website, and all of our tools for Visual Studio can be downloaded via the Toolbox App.
Check out the highlights and visit our What’s New page for more details:
- Support for Visual Studio 2022.
- New C++20 features: auto-completion of designated initializers for aggregate initialization and modernizing inspections to help you adopt new library functions.
- File templates for Unreal Engine classes.
- Improved C support: C11
_Genericexpressions and the
- Navigation in
gotostatements and inactive code.
- Evaluation results for constant expressions in the Quick Info tooltip.
- Change Signature lets you control the C++17
- New inspections with quick-fixes, and an update for Clang-Tidy with new checks from Clang 13.
Visual Studio 2022
ReSharper С++ 2021.3 supports Visual Studio 2022! You will retain access to the same rich feature set you are already used to having in other Visual Studio versions, but since Visual Studio 2022 is an x64 process, there is no longer a limit to the maximum amount of memory that can be allocated to it. This is especially important while working with large solutions, where you might previously have experienced performance problems due to memory pressure in the Visual Studio process. We encourage you to check out the new ReSharper C++ release in Visual Studio 2022 and let us know about your experience!
With ReSharper C++ 2021.3, you can now easily generate boilerplate code for aggregate initialization using C++20 designated initializers.
ReSharper C++ 2021.3 also offers modernizing inspections that help you adopt the new standard library functions for:
- erasing elements from any standard container (
- checking whether an element exists in an associative container (
- creating smart pointers with default initialization (
With a set of Unreal Engine file templates, you no longer need to switch to Unreal Editor to create a new class. Just go to Solution Explorer and right-click on the preferred project folder to open the Add menu (or use
Ctrl+Alt+Insert). After you choose an Unreal Engine template from the list and have given your new class a name, ReSharper C++ will generate the header and source files with the predefined code in the corresponding folders.
Improvements for cross-platform C code include the newly introduced support for C11
_Generic expressions, which provide a mechanism for limited compile-time choices in C, and also for
typeof – a GNU extension to the C language for referring to the type of an expression.
The File Structure window has been updated and now groups symbols that have the same qualifier in qualified names.
The Quick Info tooltip now includes the evaluation results for constant expressions. You can consult the tooltip to see what
alignof operators, and other expressions evaluate to.
We’ve made generating Doxygen comments easier. You can now create a documentation stub by simply typing
/// before the entity you wish to document. Another nice improvement is that when you press
Enter inside a single-line comment, ReSharper C++ will automatically extend the comment to the next line.
The Change Signature refactoring allows you to easily control the C++17
[[nodiscard]] attribute, which indicates that the function caller should use the function return value.
We’re constantly adding new inspections to ReSharper C++ to help you improve the quality of your code. Here are some of the new inspections with quick-fixes available in ReSharper C++ 2021.3:
- Redundant parameter list in lambda declarator
- Redundant elaborated type specifier
- For-loop can be replaced with while-loop
- Namespace definition containing single class specialization
- May be missing keyword “throw”
- [[nodiscard]] cannot be applied to functions without a return value
- Abstract final class is marked ‘final’ or ‘sealed’
- Non-overriding virtual function is marked ‘final’ or ‘sealed’
We’ve also updated the bundled Clang-Tidy to Clang 13, adding new checks from the latest LLVM release.
Last but not least, one of our top priorities for ReSharper C++ 2021.3 was the overall product quality. In total, we’ve resolved more than 270 feature requests, bugs, and performance problems. Some of the important issues fixed in this release are:
- ReSharper C++ now works smoothly with the Unreal Engine Sparse Class Data system.
- We’ve fixed an issue that would sometimes cause ReSharper to reindex source code in Unreal Engine projects after a solution is reopened.
- Rename refactoring can now handle macro arguments that are used several times in the macro expansion.
Check out our What’s New page for more details on what is included in the 2021.3 version, and also take a look at What’s New in ReSharper to keep abreast of changes that are coming to the ReSharper platform. For example, additional GitHub-related items in the Copy Code Reference pop-up make it easy to share links with people, and you can also add a custom URI template for non-GitHub repositories.
What’s your favorite improvement in this release of ReSharper C++? Give the new release a try and let us know what you think – we love hearing from you!
Your ReSharper C++ team
The Drive to Develop