July 2020

Solving the Static Initialization Order Fiasco with C++20--Rainer Grimm

Are you aware of the problem?

Solving the Static Initialization Order Fiasco with C++20

by Rainer Grimm

From the article:

According to the FAQ of isocpp.org is the static initialization order fiasco "a subtle way to crash your program". The FAQ continues: The static initialization order problem is a very subtle and commonly misunderstood aspect of C++. ". Today, I write about this very subtle and misunderstood aspect of C++.

A plea for order -- Philipp Lenk

A few days ago, one particularly ambitious victim student of mine asked for assistance in tracking down a bug.

A plea for order

by Philipp Lenk

From the article:

I know I promised to talk more about emulation, about chess and operating systems, but I have to get something off of my chest first. This is not going to be one of my would-be grand and elongated epics trying to cover far too much in far too many words. Instead, I shall focus on one very small, very self contained thing: the order of #include directives in C++ source code

 

CopperSpice: A Guide to Maps

New video on the CopperSpice YouTube Channel:

A Guide to Maps

by Barbara Geller and Ansel Sermersheim

About the video:

This video discusses the various types of C++ maps including the standard library containers and the new flatmap class available in third party libraries. We look at the underlying data structures so you can reason about picking the right one for your application, and talk about the various considerations that are involved in this choice.

Please take a look and remember to subscribe!

CppCon 2019: Range Algorithms, Views and Actions: A Comprehensive Guide--Dvir Yitzchaki

This year, CppCon 2020 is going virtual. The dates are still the same – September 14-18 – and we are aiming for the CppCon live event to have pretty much everything you’re familiar with at CppCon except moved online: multiple tracks including “back to basics” and a new “embedded” track; live speaker Q&A; live talk time zones friendly to Americas and EMEA (and we’re going to try to arrange around-the-clock recorded repeats in all time zones, where speakers who are available can be available for live Q&A in their repeated talks too, and we’ll do that if it’s possible – but we’re still working on it!); virtual tables where you can interact face-to-face online with other attendees just like at the physical event; virtual exhibitor spaces where you can meet the folks on your favorite product’s teams to ask them question face-to-face; pre- and post-conference classes; and even the CppCon house band playing live before every plenary session. All talk recordings will be freely available as usual on YouTube a month or two after the event, but everything else above will be available only live during CppCon week.

To whet your appetite for this year’s conference, here’s another of the top-rated talks from last year. Enjoy – and register today for CppCon 2020 – all the spirit and flavor of CppCon, this year all virtual and online!

Range Algorithms, Views and Actions: A Comprehensive Guide

by Dvir Yitzchaki

Summary of the talk:

STL algorithms are something every C++ programmer should know. With ranges being voted in C++ 20, there are even more useful tools that we should at least be aware of, if not use daily.

Using ranges helps writing a code which is great in expressiveness and safety and does not fall behind in performance. In this talk we will cover what ranges add to the C++20 standard library, as well as go over all the different views and actions available in range-v3 library which can be used today.

This talk is inspired by Jonathan Boccara’s talk "105 algorithms in less than an hour".

Quick Q; Recursive unordered_map

Quick A: there is no guarantee for a container to work with incomplete types.

Recently on SO:

Recursive unordered_map

STL containers are not required to work with incomplete types. If you don't mind extra indirection, then the workaround is std::map<int, std::unique_ptr<Node>>.

CppCon 2019: C++20: C++ at 40--Bjarne Stroustrup

This year, CppCon 2020 is going virtual. The dates are still the same – September 14-18 – and we are aiming for the CppCon live event to have pretty much everything you’re familiar with at CppCon except moved online: multiple tracks including “back to basics” and a new “embedded” track; live speaker Q&A; live talk time zones friendly to Americas and EMEA (and we’re going to try to arrange around-the-clock recorded repeats in all time zones, where speakers who are available can be available for live Q&A in their repeated talks too, and we’ll do that if it’s possible – but we’re still working on it!); virtual tables where you can interact face-to-face online with other attendees just like at the physical event; virtual exhibitor spaces where you can meet the folks on your favorite product’s teams to ask them question face-to-face; pre- and post-conference classes; and even the CppCon house band playing live before every plenary session. All talk recordings will be freely available as usual on YouTube a month or two after the event, but everything else above will be available only live during CppCon week.

To whet your appetite for this year’s conference, here’s another of the top-rated talks from last year. Enjoy – and register today for CppCon 2020 – all the spirit and flavor of CppCon, this year all virtual and online!

C++20: C++ at 40

by Bjarne Stroustrup

Summary of the talk:

It is now 40 years since C++ (then called C with Classes) had its first non-research user. It is now 35 years since the first commercial release of C++. It is now 30 years since the start of the standards process.

So what is C++? I will try to explain what's great about C++, C++20, as a modern language, not treating it as a layer cake of features. Imagine you have never heard of C, C with Classes, or C++11. How do classes, templates, and lambdas fit together? What have constructors and destructors to do with exceptions? What's in the standard library? How can we start using C++?

Finally, I will make a few comments about how to get from older styles of C++ use to modern C++ and point to areas where we need to improve C++ further.

8 years of Meeting C++

8 years ago in 2012, Meeting C++ got started!

8 years of Meeting C++

by Jens Weller

From the article:

In 2012 Meeting C++ got started in July. Planned first to be a one off conference, now it is a successfull international conference and a platform for C++ on the internet.

Initial Support For C++20 Ranges--Casey Carter

Ready to try them?

Initial Support For C++20 Ranges

by Casey Carter

From the article:

We are happy to announce that Visual Studio 2019 version 16.6 contains the first user-visible pieces of C++20 Ranges support. We’ve been working on support machinery for a few releases now, but in this release the tip of the iceberg has finally broken the surface of the water and there are now some tools available for users. The Ranges implementation critically depends on C++ Concepts, and as such is usable with both MSVC and Clang in their C++20 Preview modes but not yet well-supported by IntelliSense. (Don’t worry, we’ll have proper IntelliSense support soon.)...