Rscpp logo

The ReSharper C++ Blog

The Visual Studio Extension for C++ Development

News

ReSharper C++ Starts 2021.2 Early Access Program

We have big plans for 2021.2, so let’s go ahead and launch the Early Access Program for the next ReSharper C++ release! In this post we’ll outline our first steps: improvements for code generation, new inspections to modernize your code, and a lot of bug fixes.
ReSharper C++ 2021.2 EAP

Here are the main highlights:

  • New modernizing inspections: Structured binding can be used instead of tie(..) and Type trait can be simplified using a template alias or a variable template.
  • Improved generation of function definitions: configurable default function body and automatic insertion of the call to the overridden function.
  • Clang-Tidy 12.
  • Support for the new compiler switches from Visual Studio v16.10.

As usual, the EAP builds are free to use and let you try out all the newest features, but you should note that these builds might be unstable since they are works in progress. Join the Early Access Program and share your thoughts so that we can make ReSharper C++ better for you!

DOWNLOAD RESHARPER C++ 2021.2 EAP

ReSharper C++ 2021.2 offers two new inspections that help you modernize your code:

  • Structured binding can be used instead of tie(..): since C++17, you no longer need to use std::tie() or boost::tie() for unpacking a tuple or a pair – structured binding declarations help you simplify the code.
    Structured binding can be used instead of tie(..)
  • Type trait can be simplified using a template alias or a variable template: C++14 alias templates let you shorten C++11 type trait expressions.
    Type trait can be simplified using a template alias or a variable template

To make code generation even more convenient, we’ve added a new batch of settings to let you configure generated function definitions. By default, ReSharper C++ generates functions with empty bodies, but now you can specify whether the generated functions should throw std::logic_error, return a default value, or include code that will not compile.
The generated function throws std::logic_error

ReSharper C++ will also now call the overridden function from the generated body of an overriding function. In an Unreal Engine project, the idiomatic Super typedef will be used instead of an explicit class name:
The Unreal Engine Super typedef in the generated body

Check out the new Code Editing | C++ | Code Generation settings page and let ReSharper C++ write all the boilerplate code for you!

We’ve also updated the bundled Clang-Tidy binary to Clang 12, adding new checks from the latest LLVM release:
Clang-Tidy 12

On top of that, we’ve added support for the two new compiler switches from Visual Studio 16.10:

  • The /std:c++20 language standard switch.
  • The /await:strict switch, which can be used if you want to use C++20-style coroutines but are targeting C++11 or C++14.

The full list of updates includes more than 100 fixed issues, so make sure to check out the new EAP build!

DOWNLOAD RESHARPER C++ 2021.2 EAP

Your ReSharper C++ team
JetBrains
The Drive to Develop