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!
ReSharper C++ 2020.1 EAP

You can download the new EAP build from our website, or via the Toolbox App.

DOWNLOAD RESHARPER C++ 2020.1 EAP

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:

Note that ReSharper C++ EAP builds are not fully tested and might be unstable.

C++ support

In this first EAP, we have introduced more features of the C++20 standard and we’ve extended support for C++17 attributes.

Using enum

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:
Introduce Using Enum

C++20’s Concepts

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 auto or concept auto placeholder in the list of parameters:
    Abbreviated function templates
  • Constrained type placeholders – now you can constrain an auto type with a concept:
    Constrained type placeholders

Attributes

We’ve extended support for the C++17 [[maybe_unused]] and [[nodiscard]] attributes. Here is a short overview of when you can use them and how ReSharper C++ can help.

[[maybe_unused]]

The [[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:
Add [[maybe_unused]]

And another context action will help you to replace usages of the UNREFERENCED_PARAMETER macro with a [[maybe_unused]] attribute:
Replace UNREFERENCED_PARAMETER

[[nodiscard]]

The [[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.
Declare constructors [[nodiscard]]

You can also use a quick fix for the modernize-use-nodiscard inspection to add the attribute to member functions.

Code completion

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:
    Completion: attribute names
  • label names for the goto statement:
    Completion: goto labels
  • std::forward in the postfix template suggestion list:
    Postfix template: std::forward
  • parameters for a call to a base function from an overriding function:
    Parameters for a call to a base function

Code analysis

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:
    Functional-style cast used instead of a C++ cast
  • reinterpret_cast used instead of a static_cast when casting to void*:
    reinterpret_cast used instead of a static_cast

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:
Unused lambda 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.h directive 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.
  • Sort include directives

Other changes

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.
The Concept filter in Go to

We have resolved the performance issue related to type hints in dependent code. They are now shown by default without any problems!

The full list of all issues fixed in this EAP build can be found in our issue tracker. If you want to know more about what is coming in future builds, check out our roadmap.

Download, try it out, and share your feedback with us!

DOWNLOAD RESHARPER C++ 2020.1 EAP

Your ReSharper C++ team
JetBrains
The Drive to Develop

This entry was posted in News & Events and tagged , , , . Bookmark the permalink.

2 Responses to ReSharper C++ 2020.1 Early Access Program Is Now Open

  1. sergegers says:

    Hmm… Abbreviated function templates are not supported by compiler yet.

    • Igor Akhmetov says:

      Abbreviated function templates aren’t supported by MSVC yet, but there are several good reasons why we added them:
      1) Clang 10 supports them (as does GCC 10), and you can use Clang from VS for either production builds, or to experiment with new language features.
      2) We anticipate that this feature will be implemented in MSVC very soon, and we’d like you to be able to use R++ with newly supported language features right away. Implementing a big feature like that takes some time on our part, and then it also has to get tested and shipped in a release build.
      3) We wanted to finalize our work on concepts support.

Leave a Reply

Your email address will not be published. Required fields are marked *