GotW #97 Solution: Assertions -- Herb Sutter

tmp.PNGSolution just posted:

GotW #97 Solution: Assertions

by Herb Sutter

From the article:

Assertions have been a foundational tool for writing understandable computer code since we could write computer code... far older than C’s assert() macro, they go back to at least John von Neumann and Herman Goldstine (1947) and Alan Turing (1949). [1,2] How well do we understand them... exactly?

 

ACCU Overload 160 -- accu.org

The latest magazine of ACCU is online available or as paper copy for members.

by accu.org

From the index

Debt – My First Thirty Years.
Reflecting on code often reveals gnarliness. Frances Buontempo reminds herself about all the tech debt she’s ever caused.

Questions on the Form of Software.
Writing software can be difficult. Lucian Teodorescu considers whether these difficulties are rooted in the essence of development.

Building g++ From the GCC Modules Branch.
Using the WSL to build the g++ modules branch. Roger Orr demonstrates how to get a compiler that supports modules up and running.

Consuming the uk-covid19 API.
Covid-19 data is available in many places. Donald Hernik demonstrates how to wrangle data out of the UK API.

What is the Strict Aliasing Rule and Why Do We Care?
Type Punning, Undefined Behavior and Alignment, Oh My! Strict aliasing is explained.

Afterwood.
Design Patterns emerged last century. Chris Oldwood explains why he thinks they are still relevant.

Include What You Use--Jonathan Boccara

Did you know that tool?

Include What You Use

by Jonathan Boccara

From the article:

I’ve used the clang based include-what-you-use tool on a fairly large chunk of code — a couple of hundreds of files, containing dozens of includes each.

That was an interesting experiment.

Here are my takeaways on this powerful tool, what it can bring to your code, and a few things I wish I had known when I started using it...

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