Meeting 100 (27 February 2020)

Prague Trip Reports

C++20 is here

Reddit

Bjarne Stroustrup on C++20’s significance

Quotes:

  • 30 years of C++ standardization.
  • 40 years of C++.
  • C++20 is the 6th standard, the 3rd major standard; by “major” I mean “changes the way people think.”
  • This is something like the 75th meeting; I have been at about 70 of those.

Excited about C++20

Comment:

I work in a large codebase that was originally written in C and was compiled with C++03 just a few years ago. Since then, we have upgraded through C++11, C++14 and are now using C++17. So far, my experience is that every upgrade has been almost exclusively a positive experience, and each version has made it easier to write safe and expressive code.

Concepts pushed to Clang master

[C++ coroutines] Initial implementation pushed to GCC master

This is not enabled by default (even for -std=c++2a), it needs -fcoroutines

How to keep up with C++ news

  • Reddit
    • blog posts
    • code reviews
    • follow the C++ tag on StackOverflow
    • follow C++ conference talks
    • cppreference.com
    • books
    • read proposals
    • join the committee!
    • don’t…

CppCast Ep. 233: Large Scale C++ with John Lakos

There’s a misunderstanding (of contracts in the C++ committee – GD) that’s not easy to appreciate if you’re not a real day-to-day software engineer. That is what derailed contracts. I will fix it. I promise you, I will fix it.

Why does this fill me with dread?

Follow-up: Aggregates

From CppReference: An aggregate is one of the following types:

  • array type
  • class type (typically, struct or union), that has
    • no private or protected direct (since C++17) non-static data members
    • no user-declared constructors (until C++11)
    • no user-provided constructors (explicitly defaulted or deleted constructors are allowed) (since C++11) (until C++17)
    • no user-provided, inherited, or explicit constructors (explicitly defaulted or deleted constructors are allowed) (since C++17) (until C++20)
    • no user-declared or inherited constructors (since C++20)
    • no virtual, private, or protected (since C++17) base classes
    • no virtual member functions
    • no default member initializers (since C++11) (until C++14)

Twitter: Pure virtual function syntax

Move, simply

The state of a after it has been moved from is the same as the state of a after any other non-const operation. Move is just another non-const function that might (or might not) change the value of the source object.

In the absence of other information, do not do anything to an object on which std::move has been called, except assignment operator and destructor.

Rust is better than C++20, by David Sankel

David Sankel, “We Have C++20” bloopers:

(C++) is like Rust, but worse.

Operator:

What’s better about Rust?

David Sankel:

I don’t know, I haven’t actually used Rust.

Twitter: Katherine Johnson