November 16, 2018

San Diego Committee Meeting: A Trip Report

As I left Rapperswil earlier this year, I said very firmly that I would not go to the San Diego Meeting. Crossing an ocean to work on C++ 12 hours a day for a week is indeed madness. And so naturally, I found myself in a San Diego hotel straight from the 60s, to do some C++ for a week. With the exception of the author of this blog, all people there are incredibly smart and energetic, and so a lot of great work was done. Read more

October 31, 2018

Modules are not a tooling opportunity

C++ Modules are going through the standardization process and current plans would have them merged in the C++ Standard in time for C++20. They are a great language feature, offering a number of benefits over headers They feel more modern They are much faster to parse They provide protections against macros They provide some protections against ODR violations. I really can’t wait to be able to replace headers with them in my code bases. Read more

October 29, 2018

Translation units considered harmful ?

Let say you have some struct square you want to compute the area of. struct square { int width; } You could of course do that: int area(square s) { return s.width * s.width; } But, your friend Tony told you to use more functions, so instead you do that int area(square s) { return width(s) * width(s); } int width(square s) { return s.width; } area being the function you really care about it is defined first - after all, code reads from top to bottom. Read more

August 12, 2018

The case for Auto Non-Static Data Member Initializers

In this article, we talk about Auto Non-Static Data Member Initializers in C++. All code snippet can be tested on Compiler Explorer thanks to Matt Godbolt and the CE team. The clang patch to enable this feature was authored by Faisal Vali 5 years ago, but I have crudely rebased it on top of clang trunk (~ 7.0). In fact, the main motivation for this article is to put this feature in the hand of people to prove that it works and that it would be a great addition to the standard. Read more

June 13, 2018

The tightly-constrained design space of convenient syntaxes for generic programming

Please take the quick survey on concept syntax at the end of this article. Did you know that the Concept TS was merged into the Working Draft in July 2017, in Toronto? And we are a Planck length away from merging the Range TS in C++20 as well, including a few goodies such as projections, contiguous ranges/iterators and ranges adaptors? We also added a bunch of general-purpose concepts in the std namespace in Rapperswil. Read more