C++

Share:

These questions were shown only to the developers who chose C++ as one of their three primary programming languages.

Which C++ standards do you regularly use?

8%

C++98 / C++03

31%

C++11

25%

C++14

41%

C++17

23%

C++20

14%

I'm not sure

12%

C++98 / C++03

33%

C++11

24%

C++14

41%

C++17

23%

C++20

12%

I'm not sure

9%

C++98 / C++03

31%

C++11

24%

C++14

45%

C++17

25%

C++20

12%

I'm not sure

It’s great to see migration steadily progressing. I am especially glad to see game developers embracing C++20, and I’m looking forward to support from all game platforms. It will be a challenge for vendors to implement, but I am sure it will be worth it for concepts and ranges alone.

Guy Davidson

Head of Engineering Practice, Creative Assembly

I’m really surprised to see the rate of C++20 adoption. Things are clearly changing. We’re seeing a much faster adoption of new standards than we had in the past.

Jason Turner

C++ Trainer, Speaker, Author, YouTuber

I’m very glad to see that the solid majority of users are on releases from the last 5 years. Also, seeing the pre-C++11 releases drop below 10% is good news. Another couple years and we can stop including those in these sorts of surveys!

Titus Winters

Principal Engineer at Google

C++ standards migration

42%

No, I don't plan to move to another C++ standard

15%

to C++11

11%

to C++14

18%

to C++17

16%

to C++20

45%

No, I don't plan to move to another C++ standard

9%

to C++14

20%

to C++17

26%

to C++20

41%

No, I don't plan to move to another C++ standard

30%

to C++17

29%

to C++20

47%

No, I don't plan to move to another C++ standard

53%

to C++20

Always remember that there are users scattered throughout the standards timeline. Surveys like this remind us to write code that works everywhere, not just on the latest standard.

Guy Davidson

Head of Engineering Practice, Creative Assembly

I find this particularly surprising, since I’m not seeing very many companies ask for C++20 training yet. Many people still feel lucky to be moving to C++17.

Jason Turner

C++ Trainer, Speaker, Author, YouTuber

Is your current project planning to use any of these C++20 features in the next 12 months?

48%

Concepts

43%

Modules

32%

Coroutines

3%

Other

29%

None

56%

Concepts

46%

Modules

30%

Coroutines

2%

Other

28%

None

53%

Concepts

53%

Modules

42%

Coroutines

1%

Other

23%

None

I feel that the [Modules] feature still needs some further development, but I look forward to being proved wrong.

Guy Davidson

Head of Engineering Practice, Creative Assembly

I hope that we see tooling catch up so that it’s easy to use Modules in the next 12 months!

Jason Turner

C++ Trainer, Speaker, Author, YouTuber

Which IDE / editor do you use the most for C++ development?

28%

Visual Studio

28%

Visual Studio Code

24%

CLion

5%

Vi/Vim

3%

QtCreator

2%

Xcode

1%

Android Studio

23%

Visual Studio

33%

Visual Studio Code

25%

CLion

3%

Vi/Vim

3%

QtCreator

1%

Xcode

2%

Android Studio

43%

Visual Studio

17%

Visual Studio Code

18%

CLion

3%

Vi/Vim

2%

QtCreator

2%

Xcode

1%

Emacs

JetBrains has a range of C++ IDEs to help you avoid typical pitfalls and headaches that are often associated with coding in C++: CLion for cross-platform and embedded development, ReSharper C++ for Visual Studio users, and Rider for Unreal Engine and C++ game developers.

Which unit-testing frameworks do you regularly use?

35%

Google Test

26%

I don’t write unit tests for C++

17%

I write unit tests but don’t use any frameworks

12%

Catch

9%

CppUnit

7%

Boost.Test

3%

CppUTest

3%

doctest

4%

Other

34%

Google Test

17%

I don’t write unit tests for C++

21%

I write unit tests but don’t use any frameworks

14%

Catch

14%

CppUnit

7%

Boost.Test

5%

CppUTest

3%

doctest

4%

Other

21%

Google Test

27%

I don’t write unit tests for C++

21%

I write unit tests but don’t use any frameworks

17%

Catch

11%

CppUnit

7%

Boost.Test

3%

CppUTest

4%

doctest

6%

Other

Engineers much prefer writing code to tests for that code, and the time spent writing tests outweighs any real long term benefits.

Guy Davidson

Head of Engineering Practice, Creative Assembly

The statistic that a quarter of developers aren’t writing unit tests freaks me out. I don’t feel strongly about how you express those or what framework you use, but we all do need to be writing tests.

Titus Winters

Principal Engineer at Google

How do you manage your third party libraries in C++?

25%

The library source code is part of my build

24%

I compile the libraries separately using their instructions

21%

I use a system package manager

18%

I download prebuilt libraries from the internet

14%

None of the above, I do not have any dependencies

8%

vcpkg

6%

Conan

6%

Nuget

1%

build2

1%

Hunter

5%

Other

28%

The library source code is part of my build

26%

I compile the libraries separately using their instructions

24%

I use a system package manager

21%

I download prebuilt libraries from the internet

9%

None of the above, I do not have any dependencies

4%

vcpkg

5%

Conan

7%

Nuget

1%

build2

7%

Other

34%

The library source code is part of my build

25%

I compile the libraries separately using their instructions

17%

I use a system package manager

27%

I download prebuilt libraries from the internet

12%

None of the above, I do not have any dependencies

8%

vcpkg

4%

Conan

7%

Nuget

2%

build2

5%

Other

The ongoing situation with packaging C++ code for third party consumption is reflected here. I look forward to this problem being solved, but I have no optimism for that happening.

Guy Davidson

Head of Engineering Practice, Creative Assembly

The state of dependency management and package management makes me sad. The value of reproducible builds and clear dependency chains is massive. There’s so much “it happens to work” in this space.

Titus Winters

Principal Engineer at Google

Which project models or build systems do you regularly use?

57%

CMake

33%

Makefile

33%

Visual Studio project

11%

Ninja

9%

Gradle

7%

Xcode project

6%

Custom build system

4%

Qmake

3%

Bazel

2%

Autotools

63%

CMake

43%

Makefile

29%

Visual Studio project

15%

Ninja

12%

Gradle

4%

Xcode project

4%

Custom build system

6%

Qmake

2%

Bazel

3%

Autotools

54%

CMake

33%

Makefile

49%

Visual Studio project

8%

Ninja

10%

Gradle

9%

Xcode project

8%

Custom build system

3%

Qmake

3%

Bazel

3%

Autotools

I am on record as likening CMake to Stockholm syndrome for C++ engineers. It has become the de facto standard, for better or worse, as demonstrated by the clear lead it holds over its competitors.

Guy Davidson

Head of Engineering Practice, Creative Assembly

Which compilers do you regularly use?

67%

GCC

36%

Clang

32%

MSVC

12%

Clang-cl

11%

Intel

7%

Compiler for microcontrollers

6%

IntelLLVM

3%

Custom

2%

Other

In CLion, you can use GCC-based, Clang, MSVC, and IAR compilers. For rare or custom cases, a custom compiler feature allows you to use any arbitrary compiler in CLion.

Which other programming languages do you use in your projects along with C++?

44%

Python

30%

C

19%

Shell scripting languages

15%

Java

12%

SQL

11%

JavaScript

11%

C#

9%

HTML / CSS

5%

Assembly

5%

Go

Python’s ubiquity as a programming language for AI and ML means there are no surprises here. The existence of quality libraries like numpy and pandas makes it an obvious choice. Perhaps they need analogues in the standard library, or we need to sort out the packaging issue.

Guy Davidson

Head of Engineering Practice, Creative Assembly

Which of the following tools do you or your team use for guideline enforcement or other code quality / analysis?

37%

Tool provided by my IDE

24%

Clang-tidy

21%

ClangFormat

17%

Clang-analyzer / Clang Static Analyzer

10%

Cppcheck

7%

Cpplint

6%

SonarLint / SonarQube / SonarCloud

4%

Coverity

2%

PVS-Studio

2%

Parasoft C/C++test

With only 30% of people avoiding static analysis, I am reasonably confident that open-source code will become increasingly safe and secure.

Guy Davidson

Head of Engineering Practice, Creative Assembly

How do you or your team run code analysis?

48%

When compiling by enabling necessary compiler checks

26%

It’s integrated into our CI/CD pipeline

24%

We never run code analysis

20%

We use dynamic analysis

17%

Via the third-party static code analyzers running on developers’ machines

1%

Other

Which tools or techniques do you use to optimize your C++ project build times?

42%

Optimizing header includes and dependencies

30%

Precompiled headers

22%

Parallelizing the compilation of source files

17%

Compiler cache

15%

Modules

12%

Incremental linking

5%

Unity builds

Small is beautiful in this case. I’m interested to see how precompiled headers, modules, and unity builds interact in the coming year or so.

Guy Davidson

Head of Engineering Practice, Creative Assembly

Thank you for your time!

We hope you found our report useful. Share this report with your friends and colleagues.

If you have any questions or suggestions, please contact us at surveys@jetbrains.com.