Meeting 8 August 2019

What Happened to C++20 Contracts?

Nathan Myers:

This was the first time, in the (exactly) 30 years since ISO was first asked to form a Working Group to standardize C++, that the committee has removed from its Working Draft a major feature, for no expressible technical reason.

Almost immediately after the feature was voted in, one party to the original agreement -- authors of the rejected 2012 design -- began to post a bewildering variety of proposals for radical changes to the design, promoting them by encouraging confusion about consequences of the agreed-upon design.

One of the proposals, not seen before the day it was presented, seemed to offer that simplicity, and the group seized upon it, voting for it by a margin of 3 to 1. It was opposed by four of the five participants of the original design group, because it was fatally flawed: in use, programmers would need to define preprocessor macros, and put calls to those in their code instead of the core-language syntax defined. It would breed "macro hell".

On top of its inherent flaws, it amounted to a radical redesign from what was originally accepted by the full committee.

The immediate, predictable effect was panic. <...>

Two days later, the same Evolution Working Group voted to remove the feature entirely.

My word, what a thread.

Bryce Lelbach on the C++ Committee


Twitter: who does what in the C++ Committee


Technical vision for Qt 6

  • C++17
  • Strongly-typed QML
  • QML to C++ compilation, JavaScript optional
  • CMake as the build system
  • Next-generation graphics support

How do C++ developers manage dependencies?

Through much pain and anguish.

Scott Meyers' TD trick

template <typename T> struct TD; // no definition

Now you write something like TD<decltype(thing)> and the error message tells you the type of thing (as deduced by decltype, of course, but in this case that's probably what you want).

Just started learning C++ coming from Python

The new GCC compiler with colour highlighting is a little bit better at pointing out errors. It's generally quite helpful for pure C/C++ until you make an error with the standard library and you get 200 lines about std:: whatever<random characters>

In C++ a trick I always use when the error message is massive is to just focus on the first error.

CosmoScout VR

A virtual universe which lets you explore, analyze and present huge planetary datasets and large simulation data in real-time.

Uses C++17 and OpenGL. (MIT) Copyright (c) 2019 German Aerospace Center (DLR)