Last Update:
C++ at the end of 2020
Table of Contents
While 2020 was a crazy and hard year we were fortunate - C++20 was accepted and published, and the work on new features continues.
As usually every year, here’s my overview of the year: the standardization process, features, implementation, compilers, tools, books and more.
Other Reports:
2020 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012.
Disclaimer: the view presented here is mine and does not represent the opinion of the ISO C++ committee.
A Brief Introduction
Here are the main things for this year that got my attention:
- C++20 finished and published!
- C++20 almost implemented in popular compilers!
- Everything moving online!
Read on to get the full picture.
Timeline
The below table helps to see the main events:
Date | Event |
---|---|
February 10 - February 15 | Prague ISO Meeting |
March 12 | GCC 9.3 |
March 16 | Visual studio 2019 16.5 |
March 24 | Clang 10.0 |
May 7 | GCC 10.1 |
May 19 | Visual Studio 2019 16.6 |
May 26 | C++ Builder, Sydney 10.4 |
July 23 | GCC 10.2 |
August 5 | Visual studio 2019 16.7 |
September 4 | C++20 Draft International Standard Approved and ready for Publication |
September 13 - September 18 | CppCon 2020 (main event) |
October 12 | Clang 11.0 |
October 22 | Intel Compiler Classic 19.1 |
November 10 | Visual Studio 2019 16.8 |
November 12 - November 14 | Meeting C++ 2020 Conference |
December 1 | Beman Dawes, one of the most influential people in C++’s history, passed away, see memorandum @Iso |
December 15 | C++20 Published as ISO/IEC 14882:2020 |
Compiler Support for C++14
Just for the completeness and reminder:
Clang (since 3.4 ), GCC (since 5.0) and Intel (version 15.0) already have full support for C++14. Visual Studio announced full conformance with C++17 (so also with C++14) with VS 2017 15.7.
Compiler Support for C++17
In 2020 we can say that C++17 is stable enough in major compiler vendors. I see a gradual but visible transition towards using C++17 conformance flag in many projects.
Additionally with GCC 11 you’ll be using C++17 as a default C++ dialect! See this information: GCC 11 Now Defaults To C++17 Dialect By Default - Phoronix.
Still, we can have a look at a super handy table @cppreference with C++17 support, and there are a few “holes” in the Standard Library implementations:
- Parallel algorithms are not ready in Clang libc++. On GCC (since 9) you need to link against Intel TBB.
- Hardware interference size is only available in MSVC.
- PMR is not ready in Clang libc++.
- Special Mathematical Functions are not ready in Clang libc++.
- And string conversions are fully implemented only in MSVC, while Clang and GCC provide partial support (only integral types). It appears that floating-point conversions are the most difficult to implement! See this excellent presentation about the details: Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17’s Final Boss” .
The rest is ready, and you can read about all of them in my blog posts:
Ok, so how about C++20? What’s the status here?
C++20 is Done!
The C++ was lucky because the last ISO “live” meeting happened just before the COVID situation got worse and caused lockdowns in many countries. In February the ISO Comeete gathered and completed their work on C++20! Later everything could happen online - final voting and the publication process.
All in all, in September, was C++20 Approved
And in December C++20 is now publised at ISO: C++20 Published (ISO/IEC 14882:2020).
This release is very important as it fulfils the Design and Evolution of C++ specified by Bjarne Stroustrup from 1994! We have modules, coroutines, concepts and more!
You can read more directly from Brajne: Bjarne Stroustrup on C++20’s significance : Standard C++
And See this reddit thread: C++20 Published (ISO/IEC 14882:2020) : cpp with a large discussion!
Let’s have a look at some significant features. It looks like major compiler vendors are super fast and it’s very close to having the full implementation of C++20!
Feature | GCC | Clang | Visual Studio |
---|---|---|---|
P0515R3 Three-way comparison operator <=> |
10.0 | 10.0 | VS 2019 16.0 |
P0734R0 Concepts | 10.0 | 10.0 | VS 2019 16.3 |
P0898R3 Concepts Library | 10.0 | not yet | VS 2019 16.3 |
P0912R5 Coroutines | 10.0 | 8 partial | VS 2019 16.5 |
P1103R3 Modules | 11.0 | 8 partial | VS 2019 16.8 |
P0896R4 Ranges | 10.0 | no | VS 2019 16.8 partial |
P0355R7 <chrono> Calendars And Time Zones |
no | 7 partial | no |
P0645R10 <format> Text Formatting |
no | no | no |
You can track the status @cppreference.
For more information and cool, informative articles, you can have a look at a long series from Rainer Grimm about the latest features:
- std::format in C++20 - ModernesCpp.com
- C++20: The Three-Way Comparison Operator - ModernesCpp.com
- C++20: The Advantages of Modules - ModernesCpp.com
- C++20: Coroutines - A First Overview - ModernesCpp.com
- and even his new book on C++20: C++20 by Rainer Grimm @Leanpub
And stay tuned for some new articles at @CppStories soon :)
C++23 Started
After the work on C++20 has completed the Committee started working (mostly online) on the next Standard. And some of the new features are already started to appear!
The first language feature accepted is:
- Literal suffix for (signed)
size_t
- P0330R8.
And there are several library features:
- Stacktrace library - P0881R7
<stdatomic.h>
- P0943R6std::is_scoped_enum
- P1048R1contains()
forbasic_string
/basic_string_view
- P1679R3
And here’s the overall plan for the new Standard - To boldly suggest an overall plan for C++23 - P0592
- Library support for coroutines
- A modular standard library
- Executors
- Networking
And maybe:
- Reflection
- Pattern matching
- Contracts
Sorry for an interruption in the flow :)
I've prepared a little bonus if you're interested in Modern C++, check it out here:
ISO C++ Meetings
February: Prague, Czech Republic, Europe
It was the only meeting in 2020, and fortunately, the Committee managed to complete the work on C++20.
Some notes:
- 2020-03 post-Prague mailing available
- Five Awesome C++ Papers for the Prague ISO Meeting and C++20 Status
- Trip report: Winter ISO C++ standards meeting (Prague) – Sutter’s Mill
Online Meetings
Trip report: Autumn ISO C++ standards meeting (virtual) – Sutter’s Mill
See available monthly mailings summary:
- 2020-09 mailing available
- 2020-08 mailing available
- 2020-07 mailing available
- 2020-06 mailing available
- 2020-05 mailing available
- 2020-04 mailing available
Compiler Notes
Compiler vendors are very busy, and we’re glad to have lots of big and smaller releases throughout the year! Here’s a summary of the changes.
Visual Studio
The current version is Visual Studio 2019 16.8.3, last updated in December - see Release notes for the VS 2019 version.
It looks like MSVC is probably closest to implementing the full support for C++20! The team struggled with C++11 and C++14, but once they rewrote many of their backend parts they got the traction and new features are almost instant :) Congratulations!
Some MSVC news and blogs:
- A Tour of C++ Modules in Visual Studio | C++ Team Blog
- C++ Coroutines in Visual Studio 2019 Version 16.8
- Standard C++20 Modules support with MSVC in Visual Studio 2019 version 16.8 | C++ Team Blog
- C++20 Features and Fixes in VS 2019 16.1 through 16.6
- MSVC Backend Updates in Visual Studio 2019 Versions 16.3 and 16.4
And here’s a documentation page about the conformance with C++ Standards (including C++20): Microsoft C++ language conformance table
GCC
Current stable version GCC 10.2 July 23,, GCC 10 Release Series Changes
Clang
Current stable version: 11.0 - 12 October 2020, Release Notes
- Current C++ Support in Clang
- libc++ C++20 Status — libc++ 12.0 documentation
- libc++ C++2b Status — libc++ 12.0 documentation
Intel compiler
Intel Compiler Classic - C++ Compiler 2021 see the Release notes
- C++14 Features Supported by Intel® C++ Compiler
- C++17 Features Supported by Intel® C++ Compiler
- Intel OneAPI
I don’t follow news in the “computing” category that much, but there’s an excellent overview from Denis Bakhvalov so have a look here:
Computing industry at the end of 2020 as I see it. | Easyperf
C++ Builder
The current version is RAD Studio 10.4 Sydney, released May 26 and updated recently in November. See the release notes
The IDE uses a modified Clang Compiler (version 5.5, see the compiler notes) and the Dinkumware STL implementation It works with both Win32 and Win64 apps. C++Builder is a full-featured IDE for building iOS, Android, Windows and macOS apps from a single C++ codebase.
Some news:
- C++Builder support for ISO C++ in version 10.4 Sydney
- Compile 1 Million Lines Of C++ In ~2 Minutes With A 16 Core Ryzen 9 5950x
- Safer, faster, and more stable way for Internet users to experience the web!
And what’s interesting is that Embarcadero supported Dev C++ and they managed to release a new (and free) version of this cool and small IDE! Here’s a thorough overview of the process: Embarcadero Dev-C++: Successfully Modernizing A Popular Windows C++ IDE. And here’s the Github link: Embarcadero/Dev-Cpp: A fast, portable, simple, and free C/C++ IDE
Tools
While in theory, you can use a C++ compiler and a notepad you probably need some more tools to write a real project :)
Here’s a nice overview of the whole C++ Ecosystem: C++ Ecosystem: Compilers, IDEs, Tools, Testing and More - C++ Stories
And below you can find a list of their updates in 2020:
Clang Tools:
Clang/LLVM powers many great utilities! For example:
- Clang Tidy
- Clang-Include-Fixer
- AddressSanitizer
- MemorySanitizer
- For Visual Studio, you can use Clang Power Tools - Visual Studio Marketplace.
- Developed by Victor Ciura (@ciura_victor)
- The version 6.5 available since November 2020. See the changelog
- There’s also a paid version: Pro Version
- And you can also use Code Inspections based on Clang-tidy: Visual Assist Features: Code Inspection - Whole Tomato Software
IDE and Productivity
Visual Assist
The latest version from 11th November.
This year the VA team managed to put a lot of improvements, especially in the area of code inspections and better performance for large projects.
- Visual Assist build 2353 is available – Tomato Soup
- Technical Deep Dive: Reducing Memory Consumption in Visual Assist build 2393 – Tomato Soup
ReSharper C++
- C++20 Comparisons in ReSharper C++ 2020.3 | JetBrains Blog
- ReSharper C++ 2020.2: Unreal Engine Project Model, Improved C++/CLI Support, and More
- ReSharper C++ 2020.1: New C++20 Features
CLion
- CLion 2020.3: Core Dumps Debug and Debug as Root, CTest Support, MISRA Guideline Integration, and a Better Qt Project Experience | JetBrains Blog
- CLion 2020.2: Makefile Projects, C++20, Enhanced Code analysis, Doctest, and Other Unit Testing Support Improvements
SourceTrail
For a better code understanding, you can also have a look at SourceTrail. In 2019 it was released as an entirely free version! Sourcetrail is now free and open-source software – Sourcetrail Developer Blog
Code Analyzers:
PVS-Studio
PVS-Studio a tool for bug detection in the source code of programs, written in C, C++, and C#. It works in Windows and Linux environment.
It’s now in the 7.11 version, see PVS-Studio 7.11 Release: IAR Arm, Diagnostics, FREE-FREE-FREE-FREE.
You can also look at my blog post: How I Improved My Legacy C++ Project with PVS-Studio - C++ Stories
CppDepend
This year we have version 2020.1 - CppDepend - What’s new in CppDepend!)
Package Managers:
- Conan - Version 1.32 available - Conan 1.32: New validate() Method, First configurable Generator (MSBuildDeps), Renamed Multiple Toolchains & Generators, 2 New Meson Classes, Improve Lockfile Support for Private Requirements, Support for build_requires to Affect package_id (Workaround)
- Microsoft/vcpkg: VC++ Packaging Tool - open source C++ Library Manager for Windows, Linux, and MacOS.
Conferences
Hm… how to summarise what happened this year regarding conferences… hmmm :)
Everything moved online, from CppCon, Meeting C++, C++Now, ACCU, code::dive… and many more.
Here’s a good summary from March:
C++ 2020 events affected by Covid-19
Just in case here’s the link to ISO C++ page with all registered conferences around the world: Conferences Worldwide, C++FAQ.
Community & User Groups
User groups are a chance for you to meet other C++ programmers, share your experience and learn new things. I highly recommend visiting such groups regularly… or at least once in a while.
If you don’t have a User Group close to your place (but please check User Groups Worldwide), you can also participate in:
- C++ Slack channel: https://cpplang.now.sh/
- #include C++
This year we also got Meeting C++ Online! It’s one talk, once per month but totally online - so you can join from any place you like!
Books & Courses
A few selected books that arrived this year (or late 2019):
Popularity
Let’s have a look at some charts/stats:
- Tiobe shows C++ on the 4th place. It’s now 6.91%… so we gained 0.8% since last year! See the chart here: Tiobe Index.
- In the StackOverflow Survey C++ is positioned at 10th place, above C (but below Java, C# and of course JavaScript). Last year it was 9th place..
- In GitHub survey, C++ has 7th place and moved down from 6th place last year.
Your Input & Survey
A week ago, I started a quick survey where I wanted to get some data about C++ use. I got 427 answers! Thank you!
Let’s make some summary and tables from your answers :)
C++ Standard Used
On a daily basis, which C++ Standard do you use?
Answer | 2020 | 2019 | 2018 |
---|---|---|---|
Pre C++11 | 8.4% | 10.3% | 20% |
C++11 | 25.5% | 30.3% | 41% |
C++14 | 28.6% | 35% | 42% |
C++17 | 64.4% | 62.4% | 44% |
C++20 | 20.4% | 9.2% | n/a |
(The numbers for the above do not sum to 100%)
As we can see, C++17 is substantial and C++20 gains more and more users and early adopters.
Experience with C++17
What’s your experience with C++17?
Answer | 2020 | 2019 |
---|---|---|
experimenting with C++17 | 34.9% | 39.4% |
only read basic information | 9.4% | 13.4% |
already using in production | 52.2% | 41.6% |
don’t know any of its feature | 1.6% | 2.6% |
This year we can see steady progress in the adoption of the C++ Standard.
Experience with C++20
What’s your experience with C++20?
Answer | 2020 | 2019 |
---|---|---|
experimenting with C++20 | 35.6% | 29.3% |
only read basic information | 50.8% | 59.8% |
already using in production | 6.8% | n/a |
don’t know any of its feature | 5.2% | 9.1% |
Compilers Used
What compiler do you use?
Answer | 2020 | 2019 |
---|---|---|
GCC | 70.3% | 75.6% |
Clang | 49.6% | 58.7% |
MSVC | 58.5% | 56.3% |
Intel Compiler | 2.8% | 3.1% |
Borland C++ | 3% | 1.2% |
(The numbers for the above do not sum to 100%)
What additional tools do you use?
Answer | 2020 | 2019 |
---|---|---|
Debugger | 77% | 83.6% |
Sanitizers | 31.9% | 40.4% |
Static Code Analysis | 60.9% | 55.7% |
Profilers | 53.4% | 56.8% |
Clang Format | 43.3% | 49.3% |
CMake | 62.3% | 66% |
Package Managers | 23.2% | 21.4% |
(The numbers for the above do not sum to 100%), Last year I didn’t ask that question.
Best thing that happened in 2020:
This was an open question, and from what I’ve seen, the main things were as follows (no special order):
- C++20 ISO standard was approved.
- All the conferences still were there, though online
- Ranges, Concepts, Modules, Coroutines
- Keeping a job or finding a new one
- The addition of the borrow checker to Clang.
- C++17 uses in my company/project!
- C++17 parallel stl g++/clang++ support
- Cppcon2020
- Meeting C++ Online
- New AMD CPUs!
- Visual studio and lots of updates and staying ahead with C++20 support
Summary
Here are the things that got my attention this year (regarding C++):
- C++20 finished and published!
- C++20 almost implemented in popular compilers!
- Everything moving online!
It was an amazing year for C++ as a programming language! The whole progress on C++20 standardization and implementation status (we’re very close to having full support in MSVC). This all happened in this crazy 2020.
On the other hand, we also lost a very prominent C++ Expert: Beman Dawes. He joined the Committee in 1992, even before the C++98 was standardized, and from that year he contributed to many elements of C++ and the Standard Library (and Boost). You can read his story in this article @IsoC++.
Using the occasion, I wish you all the best in 2021, and hopefully, we can start getting back to “normal”!
Your Turn
- What do you think about C++ in 2020?
- What was the most important event/news for you?
- Did I miss something? Let me know in comments!
Join the discussion at this Reddit/r/cpp thread.
I've prepared a valuable bonus for you!
Learn all major features of recent C++ Standards on my Reference Cards!
Check it out here: