C++ at the end of 2020--Bartlomiej Filipek

A summary of the year and the future.

C++ at the end of 2020

by Bartlomiej Filipek

From the article:

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...

Firsts in 2020 (or, A little dose of good news)--Herb Sutter

A year full of accomplishments.

Firsts in 2020 (or, A little dose of good news)

by Herb Sutter

From the article:

2020 has been mostly terrible. That includes for the C++ committee and many of our communities, where just this month we lost Beman Dawes. Beman was one of the most important and influential C++ experts in the world, and made his many contributions mostly behind the scenes. I and everyone else who has ever benefited from any of the standardized STL, Boost, C++Now, std::filesystem, C++98/11/14/17, and more — so, really, most people who have ever used C++ — all owe Beman a debt of gratitude. We miss him greatly.

To end the year with a little dose of good news, I thought I’d mention a just few positive C++ accomplishments that did happen for 2020, and were happier “first-ever” achievements.

First, the big one…

One Trick with Private Names and Function Templates--Bartlomiej Filipek

Will you use it?

One Trick with Private Names and Function Templates

by Bartlomiej Filipek

From the article:

Last time in my blog post about How to Share Code with Const and Non-Const Functions in C++ I had a custom type declared and defined in one place (like in a header file). Recently, I tried to separate the declaration from implementation, and I got into a situation where one private function template was left.

In this article, I’d like to show you one trick that allowed me to convert this function template into a non-member function without giving up private details of the class...

Interactive C++ for Data Science--Vassil Vassilev, David Lange, Simeon Ehrig, Sylvain Corlay

Helping research.

Interactive C++ for Data Science

by Vassil Vassilev, David Lange, Simeon Ehrig, Sylvain Corlay

From the article:

In our previous blog post “Interactive C++ with Cling” we mentioned that exploratory programming is an effective way to reduce the complexity of the problem. This post will discuss some applications of Cling developed to support data science researchers. In particular, interactively probing data and interfaces makes complex libraries and complex data more accessible users. We aim to demonstrate some of Cling’s features at scale; Cling’s eval-style programming support; projects related to Cling; and show interactive C++/CUDA...

Synchronization with Atomics in C++20--Rainer Grimm

Are you familiar with it?

Synchronization with Atomics in C++20

by Rainer Grimm

From the article:

Sender/receiver workflows are quite common for threads. In such a workflow, the receiver is waiting for the sender's notification before it continues to work. There are various ways to implement these workflows. With C++11, you can use condition variables or promise/future pairs; with C++20, you can use atomics...

2020-12 mailing available

The 2020-12 mailing of new standards papers is now available.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup
N4878 Working Draft, Standard for Programming Language C++ Thomas Köppe 2020-12-15 2020-12   All of WG21
N4879 Editors' Report - Programming Languages - C++ Thomas Köppe 2020-12-15 2020-12   All of WG21
P0401R5 Providing size feedback in the Allocator interface Chris Kennelly 2020-12-14 2020-12 P0401R4 LWG Library
P0561R5 An RAII Interface for Deferred Reclamation Geoffrey Romer 2020-12-15 2020-12 P0561R4 LWG Library
P0849R6 auto(x): decay-copy in the language Zhihao Yuan 2020-12-15 2020-12 P0849R5 LEWG Library Evolution,CWG Core,LWG Library
P0901R8 Size feedback in operator new Chris Kennelly 2020-12-14 2020-12 P0901R7 CWG Core
P1030R4 std::filesystem::path_view Niall Douglas 2020-12-15 2020-12 P1030R3 LEWG Library Evolution
P1072R6 basic_string::resize_and_overwrite Chris Kennelly 2020-12-14 2020-12 P1072R5 LEWG Library Evolution,LWG Library
P1102R2 Down with ()! Alex Christensen 2020-12-15 2020-12 P1102R1 CWG Core
P1315R6 secure_clear (update to N2599) Miguel Ojeda 2020-12-18 2020-12 P1315R5 LEWG Library Evolution,LWG Library
P1478R6 Byte-wise atomic memcpy Hans Boehm 2020-12-14 2020-12 P1478R5 LEWG Library Evolution
P1642R5 Freestanding Library: Easy [utilities], [ranges], and [iterators] Ben Craig 2020-12-10 2020-12 P1642R4 LEWG Library Evolution
P1689R3 Format for describing dependencies of source files Ben Boeckel 2020-12-09 2020-12 P1689R2 SG15 Tooling,SG16 Unicode,EWG Evolution
P2077R2 Heterogeneous erasure overloads for associative containers Konstantin Boyarinov 2020-12-15 2020-12 P2077R1 LEWG Library Evolution
P2136R2 invoke_r Zhihao Yuan 2020-12-05 2020-12 P2136R1 LWG Library
P2175R0 Composable cancellation for sender-based async operations Lewis Baker 2020-12-15 2020-12   SG1 Concurrency and Parallelism
P2186R1 Removing Garbage Collection Support JF Bastien 2020-12-14 2020-12 P2186R0 CWG Core,LWG Library
P2195R1 Electronic Straw Polls Bryce Adelstein Lelbach 2020-11-22 2020-12 P2195R0 All of WG21
P2213R1 Executors Naming Amir Kirsh 2020-12-15 2020-12 P2213R0 SG1 Concurrency and Parallelism
P2216R1 std::format improvements Victor Zverovich 2020-11-25 2020-12 P2216R0 LEWG Library Evolution
P2233R3 2020 Fall Library Evolution Polls Bryce Adelstein Lelbach 2020-11-22 2020-12 P2233R2 LEWG Library Evolution
P2238R0 Core Language Working Group "tentatively ready" issues for the November, 2020 meeting William M. (Mike) Miller 2020-11-28 2020-12   All of WG21
P2247R1 2020 Library Evolution Report Bryce Adelstein Lelbach 2020-12-03 2020-12 P2247R0 LEWG Library Evolution
P2248R1 Enabling list-initialization for algorithms Giuseppe D'Angelo 2020-11-26 2020-12 P2248R0 LEWGI SG18: LEWG Incubator
P2262R0 2020 Fall Library Evolution Poll Outcomes Bryce Adelstein Lelbach 2020-12-02 2020-12   LEWG Library Evolution
P2263R0 A call for a WG21 managed chat service Tom Honermann 2020-12-14 2020-12   All of WG21
P2264R0 Make assert() macro user friendly for C and C++ Peter Sommerlad 2020-12-16 2020-12   LEWGI SG18: LEWG Incubator,SG22 Compatability,LEWG Library Evolution
P2265R0 Renaming any_invocable Kevlin Henney 2020-12-06 2020-12   LEWG Library Evolution
P2268R0 Freestanding Roadmap Ben Craig 2020-12-10 2020-12   SG14 Low Latency
P2272R0 Safety & Security Review Board Matthew Butler 2020-12-15 2020-12   SG12 Undefined and Unspecified Behavior,SG14 Low Latency,EWG Evolution,LEWG Library Evolution,Direction Group
P2273R0 Making std::unique_ptr constexpr Andreas Fertig 2020-12-09 2020-12   LEWG Library Evolution
P2274R0 C and C++ Compatibility Study Group Aaron Ballman 2020-12-13 2020-12   SG22 Compatability

Writing a custom iterator in modern C++ -- Internal Pointers

An experimental Forward Iterator written from scratch to boost up hand-made containers.

Writing a custom iterator in modern C++

by Internal Pointers

From the article:

Iterators are one of the building blocks of the Standard Library containers, but they are also useful when you want to provide the ability to iterate over elements of a custom container that you wrote yourself. Adding iterators to your containers will make them compatible with the range-based for loops and the C++ Algorithms library: a collection of functions for searching, sorting, counting and manipulating containers, based on iterators.

 

VcPkg: The Open Source Cross-Platform Package Manager from Microsoft -- Richard Thomson

Utah C++ Programmers has released a video on vcpkg:

VcPkg: The Open Source Cross-Platform Package Manager from Microsoft

by Richard Thomson

From the video description:

Richard Thomson gives us an informal introduction to vcpkg on both Windows and Linux.

Here's what we want from a package manager:
- works identically across platforms
- integrates with existing builds
- easy to find packages
- easy to consume packages
- can use prebuilt binaries to save build time
- can use local private packages as easily as public packages
- works with continuous integration systems
- doesn't require languages other than C/C++

How well does vcpkg fit the bill?

YouTube: https://www.youtube.com/watch?v=gpBDHh47w-I

SonarQube / SoanrCloud add C++17 rules -- Alexandre Gigleux

SonarSource has been working all year to improve C++ support. Recently we adjusted standard-specific rules to run only on code compiled to that standard. So C++98 rules will no longer raise issues on your C++17 code, and vice versa! 

C++ analyzer helps developers to write C++17 compliant code

by Alexandre Gigleux

From the article:

C++17 standard is out for a while now and supported by the C++ analyzer running on SonarCloud. We did an effort in the past years to fix false-positives/false-negatives related to the new constructs/features of C++17. That was great but not enough to help you be more familiar with the standard and take the best out of it.
This is why we are happy to introduce a first set of rules dedicated to C++17. With these rules, we hope you will take advantage of the new features of C++17 and write more reliable and maintainable C++17 code.

C++ analysis is available free for open source projects in SonarCloud, and in commercial editions of SonarQube.