C++

Share:

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

Share:

Which C++ standards do you regularly use?

8%

C++98 / C++03

27%

C++11

21%

C++14

43%

C++17

29%

C++20

10%

C++23

13%

I'm not sure

6%

C++98 / C++03

28%

C++11

27%

C++14

48%

C++17

37%

C++20

14%

C++23

13%

I'm not sure

5%

C++98 / C++03

25%

C++11

15%

C++14

48%

C++17

39%

C++20

16%

C++23

10%

I'm not sure

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

No surprises in the level of adoption of C++23 and earlier standards: The adoption patterns are practically the same as in recent years, just a sliding time window. C++23 shows 10% adoption in 2023, a bit lower than C++20 adoption in 2020 (12%), which is probably related to the number of new features that C++20 brought compared with C++23.

Inbal Levi

Lead Software Engineer at MPGC Services Ltd (Millennium), WG21 committee member

It’s great to see such a significant portion of the Embedded and Games industry working with C++20 already. This version extends compile time abilities, which is very beneficial for these industries with a lot of emphasis on runtime performance. I hope to see similar adoption rates for C++23 in the upcoming years.

Bryce Adelstein Lelbach

Principal Architect at NVIDIA

A large jump in the adoption of C++20 makes sense, as implementations have grown a lot more mature and feature-complete. I think we'll see a big shift from C++17 to C++20 as the "base" dialect for much of the community over the next few years.

C++ standards migration

57%

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

12%

C++11

2%

C++14

16%

C++17

9%

C++20

5%

С++23

50%

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

1%

C++98 / C++03

4%

C++14

21%

C++17

13%

C++20

10%

С++23

42%

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

2%

C++98 / C++03

5%

C++11

25%

C++17

19%

C++20

7%

С++23

45%

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

1%

C++11

1%

C++14

31%

C++20

22%

С++23

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

57% of those using C++98/03 are not planning to move to another standard? That could be disappointing, but given that generally, only 8% of respondents are still on C++98/03, it means that only around 4% of the world’s C++ code is staying with that old standard, which is not bad and similar to other programming languages.

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

48%
53%

Concepts

43%
49%

Modules

32%
29%

Coroutines

3%
3%

Other

29%
21%

None

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

While lots of progress has been made recently in build systems and the ecosystem to support C++20 modules, half of the respondents planning to use C++20 modules (I assume in production) in the next year seems overly optimistic in my opinion. I don’t think we will be there in the next 12 months.

Inbal Levi

Lead Software Engineer at MPGC Services Ltd (Millennium), WG21 committee member

I’m really happy to see the fast adoption rate of features in the Embedded world, which has traditionally been known to adopt things slowly. I believe this is also related to the great benefits C++20 can provide to the embedded domain.

Bryce Adelstein Lelbach

Principal Architect at NVIDIA

I wonder how many people have actually tried to use modules. There's a lot of interest but not so much adoption.

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

27%

Visual Studio Code

26%

CLion

26%

Visual Studio

4%

Vi / Vim

3%

Qt Creator

2%

Android Studio

2%

Xcode

1%

NetBeans

1%

Sublime

1%

Emacs

1%

KDevelop

1%

AppCode

1%

Eclipse CDT

4%

Other

34%

Visual Studio Code

29%

CLion

19%

Visual Studio

6%

Vi / Vim

3%

Qt Creator

1%

NetBeans

1%

Sublime

2%

Emacs

2%

Eclipse CDT

3%

Other

20%

Visual Studio Code

30%

CLion

30%

Visual Studio

2%

Vi / Vim

1%

Qt Creator

1%

Android Studio

2%

Xcode

2%

Sublime

2%

Emacs

1%

KDevelop

1%

Eclipse CDT

1%

Atom

8%

Other

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

The market is clearly dominated by Microsoft and JetBrains. It seems the quick growth of VS Code is finally slowing down (at least among the C++ audience) and has started to stabilize in equal quotas for the three major players – CLion, VS, and VS Code.

Which unit-testing frameworks do you regularly use, if any?

26%

29%

I don’t write unit tests for C++

17%

16%

I write unit tests but don’t use any frameworks

35%

33%

GoogleTest

12%

12%

Catch

9%

9%

CppUnit

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

29% still don’t write unit tests for their C++ code, which is sad. Even if the number keeps slowly declining over the years, it’s not fast enough. The future of the language also depends on fixing things like this.

Inbal Levi

Lead Software Engineer at MPGC Services Ltd (Millennium), WG21 committee member

I’m surprised to see the number of developers writing unit tests without frameworks. There’s an effort in the committee to promote the topic of package managers, which I hope will affect the reduction of these numbers in the upcoming years – both for those who don’t write unit tests and for those who do so without a framework.

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

25%

24%

The library source code is part of my build

21%

21%

I use a system package manager

24%

19%

I compile the libraries separately using their instructions

18%

18%

I download prebuilt libraries from the internet

14%

15%

I do not have any dependencies

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

It is good to see that fewer developers are manually compiling libraries using their instructions. There is hope that using automated solutions will further reduce this practice, which is unique to the C and C++ ecosystems.

Inbal Levi

Lead Software Engineer at MPGC Services Ltd (Millennium), WG21 committee member

I think this is a great indication that wide support of package managers across the C++ community is necessary.

Bryce Adelstein Lelbach

Principal Architect at NVIDIA

Sooner or later, we may reach an inflection point where these package managers (vcpkg, Conan, etc.) are mature enough and sufficiently widely used that they become a defacto standard. But, we're not there yet.

Which project models or build systems do you regularly use?

57%

54%

CMake

33%

29%

Visual Studio project

33%

28%

Makefile

11%

15%

Ninja

9%

6%

Gradle

Bryce Adelstein Lelbach

Principal Architect at NVIDIA

Very interesting to see CMake drop in market share and Ninja increase in market share. This isn't a trend I was aware of. Perhaps it's just noise, but given CMake's rapid growth until now, this data suggests that it has reached peak saturation.

Which compilers do you regularly use?

65%

GCC

36%

Clang

31%

MSVC

13%

Clang-cl

11%

Intel

9%

Intel LLVM

7%

Compiler for microcontrollers

3%

Custom

2%

Other

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

45%

Python

29%

C

16%

Shell scripting languages

14%

JavaScript

13%

Java

12%

SQL

10%

HTML / CSS

10%

C#

5%

Rust

5%

Assembly

4%

Go

4%

Lua

3%

TypeScript

3%

MATLAB

2%

Kotlin

2%

PHP

2%

Visual Basic

2%

Perl

1%

Objective-C

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

Python is yet another very useful tool for the C++ developer toolbelt.

Bryce Adelstein Lelbach

Principal Architect at NVIDIA

More JavaScript and Rust being used in combination with C++ seems to be the trend here. Given the rising popularity of Rust, it's surprising that there's not a more rapid growth of Rust + C++. That suggests it may be harder to use Rust in existing projects (as opposed to new projects).

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

37%

31%

Tool provided by my IDE

24%

27%

Clang-tidy

21%

24%

ClangFormat

17%

18%

Clang-analyzer / Clang Static Analyzer

10%

11%

Cppcheck

Bryce Adelstein Lelbach

Principal Architect at NVIDIA

I think the decrease in IDE-provided analysis tools here is indicative of people incorporating static analysis into their CI, like running the Clang-tidy/ClangFormat/Clang static analyzer in GitHub Actions.

How do you or your team run code analysis?

50%

When compiling by enabling necessary compiler checks

27%

It’s integrated into our CI/CD pipeline

23%

We never run code analysis

19%

We use dynamic analysis

18%

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?

39%

Optimizing header includes and dependencies

28%

Precompiled headers

23%

Parallelizing the compilation of source files

19%

Compiler cache

14%

Modules

12%

Incremental linking

6%

Unity builds

4%

Incredibuild

1%

Electric Cloud

1%

Other

32%

None

46%

Optimizing header includes and dependencies

26%

Precompiled headers

29%

Parallelizing the compilation of source files

22%

Compiler cache

17%

Modules

14%

Incremental linking

6%

Unity builds

2%

Incredibuild

1%

Electric Cloud

1%

Other

29%

None

46%

Optimizing header includes and dependencies

35%

Precompiled headers

25%

Parallelizing the compilation of source files

24%

Compiler cache

16%

Modules

16%

Incremental linking

11%

Unity builds

7%

Incredibuild

1%

Electric Cloud

2%

Other

28%

None

Diego Rodriguez-Losada Gonzalez

Lead Architect, JFrog

Five to 10 years ago, the C++ IDE market was essentially dominated by one product, Visual Studio, which was Windows-specific. People used to develop on Windows solely to have access to a good IDE. Today, we have two major vendors in this space – JetBrains and Microsoft – which is great for users. With Visual Studio Code and CLion, IDEs are now much more accessible for non-Windows developers.

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.