C++20 and ReSharper C++

In July of this year, in the German city of Cologne, the ISO WG21 committee approved the full draft of C++20. After Belfast, in November, we now have just one more meeting (in Prague) to deal with national body comments and get their approval. That means that, barring any catastrophes, C++20 will become the current standard sometime after February of next year.

So C++20 is still in the future, but we now have a very good idea of everything that will be in it. Large sections of it have already been implemented in several compilers. GCC and Clang are leading the pack here (EDG is only a front-end) – but MSVC, still shrugging off its historically slowcoach image, is biting at their heels!

Within Visual Studio we can choose between MSVC and clang-cl so, between the two, we have access to a large part of the C++20 surface area today (at time of writing).

But it’s not just the compilers that are getting ahead of the game. ReSharper C++ supports many of these features already, too – often with extra analysis and insights enabled by them.
Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , | Leave a comment

Unreal Engine support in ReSharper C++ 2019.2

We’ve just released the 2019.2 version of ReSharper C++, which has some great new features and updates for general C++ usage, with major improvements to indexing speed, usability improvements in code completion, updated code hints, C++20 support and much more. You can read about these new features in our release announcement post.

But in this post, let’s take a look at the changes we’ve made specifically for Unreal Engine. Obviously improved indexing speed is a big deal, but we are also putting lots of effort into more sophisticated, targeted support of UE4. The aim is to understand specific UE4 code better and provide features for making game development with Unreal Engine in ReSharper C++ easier and more productive.

For this release, we’ve concentrated on two main areas – reflection macros and increasing our support for RPC function calls.
Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , , | 4 Comments

ReSharper C++ 2019.2: Faster indexing, improved C++20 support, new code analysis checks, and better Unreal Engine support

Please welcome the second major update of this year – ReSharper C++ 2019.2 – with many great new additions!

The long ongoing work on speeding up the indexing has finally come to fruition in this product release. We’ve significantly enhanced code completion and navigation, and added new code analysis checks, new formatter options, and new code hints.

At the same time, we have been working towards better compliance with the C++20 standard (even though it’s still in progress in the Committee!). We’ve also made the editor smarter and added features to help game developers using Unreal Engine get more from it.

ReSharper C++ 2019.2 release

Here are the main highlights – click each area for the details:

Get the brand new build from our site and evaluate its features and enhancements completely free for 30 days:

DOWNLOAD RESHARPER C++ 2019.2

Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , , , , , | Leave a comment

Better Ways to Test with doctest – the Fastest C++ Unit Testing Framework

Which C++ unit testing framework do you use? In this guest blog post, Viktor Kirilov shares how Doctest, a new C++ testing framework he contributes to, is better than others.

Viktor Kirilov Viktor Kirilov

GitHub
@KirilovVik
Viktor is a huge fan of the Nim programming language and recently worked on adding support for hot code reloading at runtime in the compiler. Obsessed about developer productivity; most of his public talks have been about optimizing the compilation time of C++ programs and reloading code at runtime. He is the author of doctest – the fastest C++ unit testing framework.

doctest is a relatively new C++ testing framework but is by far the fastest both in terms of compile times (by orders of magnitude) and runtime compared to other feature-rich alternatives. It was released in 2016 and has been picking up in popularity ever since.

A complete example with a self-registering test that compiles to an executable looks like this:

Continue reading

Posted in Uncategorized | Tagged , , , | 9 Comments

ReSharper C++ 2019.1: More Responsive, Better for Unreal Engine, and with New Language Features

This year’s first major update – ReSharper C++ 2019.1 – is finally here! Explore the dozens of significant performance improvements inside, as well as dedicated support for Unreal Engine 4, more flexible integration with Clang-Tidy, naming conventions, and the new Doctest unit testing framework.

ReSharper 2019.1 release

Check out the details below on how ReSharper C++ improved on the following:

Get the brand new build from our site and evaluate its features and enhancements completely free for 30 days:

DOWNLOAD RESHARPER C++ 2019.1

Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , , , , , , , | 2 Comments

C++ Quiz from C++ Russia 2019

Hi,

We’ve recently visited a fantastic C++ Russia conference in Moscow. It gathered about 600 developers from Russia and the CIS, and several international speakers, with keynotes by Nico Josuttis and two days full of great talks. And we also had time for a C++ quiz!

This year, the JetBrains C++ team ran the quiz as an evening event on the first conference day. The quiz we prepared consisted of two parts. The first one was rather easy, so the speed of replies mattered. The second one required a more thoughtful approach and a detailed answer to each question. People asked us to publish the second part so here it is. Read each question and the code sample, and see if you can get the answer right!

Question 1: Does this code compile?

Answer: While line 6 is fine, line 9 should not compile. If you treat it as a definition of ‘x’, then an inline is missing. If you treat it as a declaration, then CTAD doesn’t work. However, GCC somehow manages to compile this code! See this: https://gcc.godbolt.org/z/sviRE5
Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

ReSharper C++ 2019.1 for Unreal Engine: UE4 naming convention and completion for reflection specifiers

We’ve recently told you about a few major improvements in ReSharper C++ 2019.1 for those who develop games on Unreal Engine:

  • Part I: Performance improvements: faster cold startup times, better memory utilization, and new settings to tweak ReSharper’s indexing behavior
  • Part II: support for Remote Procedure Calls
  • Part III (today): Support for UE4 naming convention and completion for reflection specifiers

If you are making games based on Unreal Engine, grab this free build and give it a try. We want to hear your feedback, be it good or bad!

GET RESHARPER C++ 2019.1 EAP

Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , , , | Leave a comment

ReSharper C++ 2019.1 for Unreal Engine: Remote Procedure Calls

In this series of blog posts, we talk about some specific features for those who develop games with Unreal Engine:

  • Part I: Performance improvements: faster cold startup times, better memory utilization, and new settings to tweak ReSharper’s indexing behavior.
  • Part II (this post): Support for Remote Procedure Calls.
  • Part III (coming soon): Support for the UE4 naming convention and completion for reflection specifiers.

So today we want to tell you about another Unreal-Engine-specific feature that was added in ReSharper C++ 2019.1 – support for RPCs.

If you are making games based on Unreal Engine, grab this free build and give it a try. We want to hear your feedback, be it good or bad!

GET RESHARPER C++ 2019.1 EAP

Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , , , | 6 Comments

ReSharper C++ 2019.1 EAP Meets Unreal Engine 4

ReSharper has just started an Early Access Program for v2019.1 and there are plenty of great things we plan to add or improve. The ReSharper C++ team has started this year putting the pedal to the metal on performance optimizations in Unreal Engine 4 codebases. The changes include faster cold startup times, better memory utilization, and new settings to tweak ReSharper’s indexing behavior.

GET RESHARPER C++ 2019.1 EAP

Faster startup times

Depending on the CPU in your workstation, you may expect cold startup to become 5.5 to 6 times faster. This is the time between opening the solution and getting access to the full functionality of ReSharper C++.

A number of things have contributed to these speedups:

  • Algorithmic improvements in code indexing.
  • Skipping plugins and third-party code when indexing an Unreal Engine 4 project by default.
  • Faster cache serialization.

The options that affect code indexing in Unreal Engine 4 solutions are grouped under a new options page at ReSharper | Options | Code Editing | C++ | Unreal Engine.
unreal_engine_options

Clear the Index third party code and Index plugins checkboxes if you want to skip source files under “Plugins” and “ThirdParty” folders from indexing, or Index Unreal Engine source files to skip the indexing of the engine code altogether.

Note that ReSharper C++ indexes engine code in the background by default. This was already implemented in 2018.3, so here’s just a friendly reminder that you can start working with your game logic code long before the engine code is fully processed. If you turn off background indexing using the Enable background indexing checkbox, this will result in a faster but more intrusive initial indexing.

Let’s make a test!

The following performance test proves the numbers we’ve mentioned above. Using Unreal Engine v4.20.3 and the “Shooter Game” project from the Epic Games Library, we measured the cold startup time for parsing game code and Unreal Engine code, respectively:

intel_cold_start

  1. Intel i7-8700k: ReSharper C++ cold start time
    • 2018.3:
      • Game code: 30 sec
      • Unreal Engine code: 23 min 00 sec
      • Total time: 23 min 30 sec
    • 2019.1:
      • Game code: 30 sec (no change)
      • Unreal Engine code: 3 min 39 sec (6.3 times faster than before)
      • Total time: 4 min 12 sec (5.59 times faster)

amd_rider_cold_start

  1. AMD Threadripper 1950x: ReSharper C++ cold start time
    • 2018.3:
      • Game code: 1 min
      • Unreal Engine code: 29 min 30 sec
      • Total time: 30 min 30 sec
    • 2019.1:
      • Game code: 50 sec
        (1.2 times faster than before)
      • Unreal Engine code: 4 min 16 sec (6.76 times faster)
      • Total time: 5 min 6 sec (6.08 times faster)

The numbers speak for themselves! Feel free to get the EAP build and take your own measurements on your own Unreal Engine project.

Smaller memory footprint

Besides faster initial indexing, our team has implemented many memory usage optimizations. Both the memory traffic during initial indexing and the memory footprint afterwards have been improved in order to make the IDE more responsive.

GET RESHARPER C++ 2019.1 EAP

Check out the latest ReSharper C++ 2019.1 EAP build and let us know if the IDE performance has improved for you in Unreal Engine 4 projects! As always, your feedback will be greatly appreciated. And there are more goodies coming in this area, so don’t change the channel!

Join us at Game Developers Conference 2019 later in March and chat about Unreal Engine 4 support in our tools!
GD_Facebook_banner

Cheers,
Your ReSharper C++ Team

Posted in ReSharper C++ Tips & Tricks | Tagged , , , | 11 Comments

ReSharper C++ 2018.3: every bit better!

Please welcome the third release of ReSharper C++ this year! v2018.1 brought debug step filters and includes analyzer, while v2018.2 came with the initial C++/CLI support and better understanding of C++17 and C++20 standards. The just released v2018.3 tunes literally every smart feature the product has, making them work more precisely on modern C++ code.

blog@2x

Let’s dive into the details:

Get the fresh build on our site and evaluate new features and enhancements completely free for 30 days:

Download ReSharper C++ 2018.3

Continue reading

Posted in ReSharper C++ Tips & Tricks | Tagged , , , , | 2 Comments