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

When an error message is worth a thousand words

ReSharper C++ is currently running its Early Access Program for v2018.3, which already has a few important enhancements to offer:

  • C++/CLI support has been improved with several new context and generate actions for C++/CLI code.
  • Solutions are loaded a lot faster, especially those that use the Unreal Engine. The main catch is that ReSharper C++ only parses non-engine projects during the initial indexing; the engine files are indexed in the background later.
  • Predefined naming schemes for common C++ code standards were introduced.
  • Refactorings, code generation, formatting, and other areas have been enhanced in various ways.

Among these improved areas, there’s one we’d like to talk about in more detail. The error annotator in ReSharper C++. These improvements are available in the recently published 2018.3 EAP 6 build. Let’s see what it’s all about!
Continue reading

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

What’s New in ReSharper C++ 2018.2

Please welcome ReSharper C++ 2018.2!

While ReSharper C++ 2018.1 introduced two major new features, debug step filters and includes analyzer, ReSharper C++ 2018.2 is focused on improving its understanding of the C++ language. The biggest highlight is its long-awaited support for C++/CLI. In addition, many important features from C++17 and even the upcoming C++20 have been implemented. Code analysis is enhanced with spell-checking inspections powered by the newly bundled ReSpeller plugin, as well as formatting inspections to help you maintain a consistent code style.

800x400_blog

Download ReSharper C++ 2018.2

Continue reading

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

C++/CLI support comes to ReSharper C++

ReSharper C++ joined the ReSharper fold back in 2015 to bring the power of ReSharper to the world of C++ – and has been getting better ever since! For most people this has rounded out the ReSharper story within Visual Studio. However an odd gap remains. Odd because the worlds of C++ and C# are bridged by the interop language, C++/CLI, yet this has remained unsupported by the ReSharper family.

Until now, that is!

From 2018.2 (available now in the EAP) ReSharper C++ has initial support for C++/CLI. There are some limitations, so read on to find out more. Support is enabled by default, but can be disabled by going to ReSharper | Options | Code Editing | C++ | Inspections, and unchecking “Enable C++/CLI support”. But we hope you won’t do that – especially as we’re also looking for user feedback and greater field experience.

A peculiar beast

As a rule nobody uses C++/CLI as a primary language. That’s not what it’s been designed for. While C# is a highly productive language, and is no slouch when it comes to performance, there are many reasons that we may also have a parts of our project written in pure C++. C++/CLI is an answer to the question, “how do I get to, or from, my pure C++ from C# (or any .NET language)?”. If you just need to call into C++, and it exposes a C API, P/Invoke may be the simplest way to go. But for more complex cases – where you want to model richer types and class hierarchies – C++/CLI let’s you do that. But it comes at the cost of a more complex language, with curious syntactic additions and sometimes tricky lifetime issues. So any help we can get from our tools while writing and maintaining this code is very welcome.

What is supported?

ReSharper C++ 2018.2 gives us initial support for C++/CLI projects. What does that mean? Well first it means that the parser and resolver now finally understand the extension system, with ^’s for CLR references, gcnew for allocating on the managed heap, etc. It also means that many static analysis features now work and can give us valuable insight. Note that, at time of this writing, there may still be a few limitations here. Please report these in our issue tracker so we can address them as quickly as possible.

Within C++/CLI code we have access to all the same great refactorings and intention actions as in pure C++ code. For example postfix templates are a great way to rewrite statements around a value. Where applicable these should work across C++/CLI and pure C++ codebases – for example you can rename a pure C++ symbol, or even a C# symbol, from within a C++/CLI usage. Again, some limitations may apply.

Renaming a .NET symbol from C++/CLI

We can also navigate between C# and C++/CLI worlds. For example if we place the caret over a C++/CLI method name in some C# code you can now navigate to the definition in the C++/CLI code (note that this is referred to as “Go to declaration” in the menu, due to how these terms are used in C#). You can do the same going the other way, too.

For now there are some known limitations here. For instance from a C# project in the same solution, renaming a C++/CLI symbol is not an option. From the C++/CLI project, renaming a symbol referred to by the C# project wll rename it within the C++/CLI code, but not in the C# project. As mentioned already, renaming a native C++ symbol from a C++/CLI project works as expected, however.

Code generation is also limited for now, as generators for C++/CLI specific constructs, such as ref classes, have not yet been written. And the #using directive (for importing metadata in directly from a dll) is not supported at all – meaning both the use of the #using directive, as well as any symbols referenced from the dll, will currently be flagged as errors by the analyser.

We need your help

C++/CLI is unique in many ways. Software projects that make use of it tend to be larger enterprise style projects of in-house code bases that cannot be shared outside the organisation. There is very little in the way of non-trivial open source projects using C++/CLI. Here at JetBrains we only use it in some small ways internally to the ReShaper C++ implementation. So it is particularly difficult to build realistic test cases. As we move to expand our coverage we’ll rely a lot more on the community to tell us what’s not working (of course we’d also love to hear what’s working, too!) so we can do our best to address it and make our C++/CLI support first class.

As usual, please share your feedback with us and report issues either in the issue tracker or on the support forum.

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

Analyzing includes with ReSharper C++

Hi,

Last week we published a detailed overview of ReSharper C++ 2018.1 changes. One of the major features for this release is Includes analyzer, a tool for locating and eliminating unnecessary header dependencies and thus upping compilation speeds. You can read about it in detail in this blog post. Today though, we’d like to give you a short demo recorded by Phil Nash, our C++ tools developer advocate. Watch the Includes analyzer in action and download the free 30-day trial of ReSharper C++ to try it on your project:

If you find Includes analyzer useful or have questions or comments about it, please use the comment section below or our issue tracker to share your feedback with us. We’ll be glad to know what you think!


Download ReSharper C++ 2018.1

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