Reading C++ Code with Ease

Programmers often spend more time reading code than writing it. Your own program logic is difficult to figure out at times, not to mention trying to understand someone else’s code!
Modern C++ makes this even more complicated. Try to guess the types in this code. When you’re ready, click the GIF to see the answer:
decltype(auto) hints

This is why we believe reading assistance features are as important as those that help you write new code.
We first introduced various inlay hints in ReSharper C++ 2018.3. We’ve been iterating and improving them, and in the 2019.3 release we are ready to give you Type Name Hints.
Let’s take a look at what kinds of hints are available now and how they can help you:

DOWNLOAD RESHARPER C++ 2019.3

Continue reading

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

ReSharper C++ 2019.3: C++20 Concepts, Type Hints, Sorting of #includes, and more

Please welcome ReSharper C++ 2019.3, our third and final update of this year!

ReSharper C++ 2019.3 introduces support for new C++20 features including Concepts, one of the most significant language changes in C++20. Type hints in the editor make your code easier to read. The new Sort #include directives context action and the accompanying inspection help you keep #include directives in order, and there are also a number of new code checks thanks to bundled Clang-Tidy 9. For game developers working with Unreal Engine 4 projects, ReSharper C++ 2019.3 offers new live templates to generate UE4-specific code, in addition to support for UE4’s smart pointers.
ReSharper C++ 2019.3

Read on for more details about these features and other changes in the 2019.3 release:

If you’d like to try the new features completely free for 30 days, get the brand new build from our website.

DOWNLOAD RESHARPER C++ 2019.3

Continue reading

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

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