ReSharper C++ 2020.1 Early Access Program Is Now Open
Today we are launching the Early Access Program for the next major release of ReSharper C++ – 2020.1. Try the EAP builds for free and get early access to the latest improvements and upcoming features!
You can download the new EAP build from our website, or via the Toolbox App.
The first EAP build improves on the features introduced in the recent 2019.3 release. It also includes some new features and enhancements.
The main highlights of this build are:
- C++ support:
using enum, attributes, and more support for C++20’s concepts
- Code completion: attributes,
std::forward, and calling base function
- Code analysis: new inspections and quick fixes
- Unreal Engine 4: better Rename refactoring
- Sorting of #include directives: more options
- Other changes
In this first EAP, we have introduced more features of the C++20 standard and we’ve extended support for C++17 attributes.
C++20 improves using declarations to support bringing specific enumerators into the local scope. The new
using enum syntax allows you to add all the enumerators from the target enumeration. As a result, you can omit repetitions of the enumeration name when using its member enumerators, making your code more concise.
ReSharper C++ 2020.1 supports the new syntax and also adds a new refactoring that helps with adding
using enum statements. To invoke it, place the caret at an enumerator and press Ctrl+Shift+R, or choose ReSharper | Refactor | Refactor This from the main menu, and then select Introduce Using Enum from the Refactor This menu:
ReSharper C++ 2020.1 supports two new concept-related features:
- Abbreviated function templates – we have extended C++20’s Concepts support with this new syntax for function and lambda declarations. Now you can declare a template function with the
concept autoplaceholder in the list of parameters:
- Constrained type placeholders – now you can constrain an
autotype with a
We’ve extended support for the C++17
[[nodiscard]] attributes. Here is a short overview of when you can use them and how ReSharper C++ can help.
[[maybe_unused]] attribute can be added to avoid warnings from the compiler about an unused name or entity. This attribute is applicable to class declarations, function return types, variables, and more.
When the caret is on an unused entity, a new context action Add [[maybe_unused]] will be available:
And another context action will help you to replace usages of the
UNREFERENCED_PARAMETER macro with a
[[nodiscard]] attribute can be added to raise a warning when the return value of a function is not used. ReSharper C++ 2020.1 now offers you the option to declare generated getters and constructors
[[nodiscard]] in the generation wizard.
You can also use a quick fix for the
modernize-use-nodiscard inspection to add the attribute to member functions.
Code Completion is a very important feature for improving your productivity. Just start typing or press Ctrl+Space to see the suggestion lists for the following new code completions:
- attribute names:
- label names for the
std::forwardin the postfix template suggestion list:
- parameters for a call to a base function from an overriding function:
New inspections detect more cases when you should prefer
static_cast, and the corresponding quick fix is here to help you update your code:
- Functional-style cast used instead of a C++ cast:
reinterpret_castused instead of a
static_castwhen casting to
And there’s one more new inspection – if a local variable is captured by a lambda but not used inside the lambda body, ReSharper C++ notifies you and suggests removing the unused capture:
Unreal Engine 4
Rename is one of the most useful refactorings, and now it has more UE4-specific support:
- When renaming a UE4 header, the corresponding
#include *.generated.hdirective will also be updated.
- When renaming a UE4 type, the corresponding header and source files (with the A, F, E prefixes) will also be renamed.
Sorting of #include directives
We presented this feature in the 2019.3 release, but we have already received a lot of feedback, and we’re ready to make the sorting rules even more customizable. There are two new options:
- Case-sensitive sort – used to place all includes starting with uppercase letters before the lowercase ones.
- Group headers by directory – used to create groups of headers based on their location.
A small but pleasant improvement for typing assistance: you can now select any piece of code and enter a single parenthesis/bracket/quote to surround the selection with the corresponding characters.
We’ve also added new filter categories in Go to for concepts and namespaces. Press Ctrl+T and type “/” to see all the available filters.
We have resolved the performance issue related to type hints in dependent code. They are now shown by default without any problems!
Download, try it out, and share your feedback with us!
Your ReSharper C++ team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
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++.
ReSharper C++ 2023.2 EAP: Introducing AI Assistant
Starting from this EAP build, ReSharper has its own integrated AI Assistant ready to chat in the dedicated tool window (ReSharper | AI Assistant).
ReSharper C++ 2023.2 EAP: Support for the C++23 Standard Library Modules
Support for C++23 standard library modules and C++20’s [[no_unique_address]] attribute, new code formatter settings, and other updates.