Articles & Books

Top Ten Reasons To Send Your Developers to CppCon (or any C++ Conference)--Jon Kalb

So you should send them.

Top Ten Reasons To Send Your Developers to CppCon (or any C++ Conference)

by Jon Kalb

From the article:

Sending software engineers to conferences is both a time and money expense, but conferences exists because they provide value to attendees and companies that send them. Some of the value may be obvious, some may not. Here is a list of the top business reasons to send your developers to CppCon or any other C++ conference...

Quick Q: What are copy elision and return value optimization?

Quick A: a way to remove copying objects in certain case, improving performance and reducing the constraints on a class (no copy or move needed).

Recently on SO:

What are copy elision and return value optimization?

Copy elision is an optimization implemented by most compilers to prevent extra (potentially expensive) copies in certain situations. It makes returning by value or pass-by-value feasible in practice (restrictions apply).

It's the only form of optimization that elides (ha!) the as-if rule - copy elision can be applied even if copying/moving the object has side-effects...

Conference Report: ACCU 2019--Quentin Balland

Another one.

Conference Report: ACCU 2019

by Quentin Balland

From the article:

I had the pleasure to attend to the ACCU2019 at Bristol which was my first cpp centred conference (the first of a long series I hope :p) and it was amazing in a different aspect.


It is a 4 days conference that occurs every year between March and April in the Marriott hotel in Bristol.


Amazing people, very inclusive and easy to talk to everyone!

How to Write Safe and Expressive Multi-Threaded Code in C++11--Louis-Charles Caron

Did you think about that?

How to Write Safe and Expressive Multi-Threaded Code in C++11

by Louis-Charles Caron

From the article:

I started writing multi-threaded code two years ago. Two years and one day ago, I would start sweating at the sound of the the words thread and mutex. But after literally a few days of practice (and, I admit, a 3-day course on multi-threading and C++11), I figured the basic principles are quite understandable.

Typical multi-thread problems can be solved by using a handful of tools. Admittedly, complex problems are even more complex when they appear in multi-threaded code, but I did not happen to run into those yet.

Since C++11, one now finds the necessary multi-threading tools in the C++ standard library. Finally! We can write multi-threaded code in pure C++.

The multi-threading part of the C++11 library is functional: it is simple and to the point. However, it is nearly impossible to write clear and expressive multi-threaded code using only the C++11 tools. And when multi-threaded code is not clear, it tends not to be safe.

In this article, I introduce some multi-threading tools you will find in the C++11 standard library through a code example. Although simple, this example will clearly demonstrate the shortcomings of the C++11 standard library. Then, I present safe: a small header-only C++11 library I designed to make my multi-threaded code more expressive, and ultimately safer...

Handling errors is canceling operations--Andrzej KrzemieĊ„ski

Understand why it is done that way.

Handling errors is canceling operations

by Andrzej Krzemieński

From the article:

I actually covered this topic before, in this post, but given my recent experience I feel it needs reiterating and a bit of restructuring. It boils down to the observation that any error handling I have encountered — be it error codes, errno, exceptions, error monad — is about canceling operations that depend, directly or indirectly, on the function that reported failure. This has some consequences on how we look at our program flow and what principles we should follow when responding to failures in our programs...

The Rule of Zero in C++--Jonathan Boccara

What's your opinion?

The Rule of Zero in C++

by Jonathan Boccara

From the article:

Now that we’re clear on the Compiler-generated Functions, the Rule of Three and the Rule of Five, let’s put this to use to reflect on how to use the “= default” feature to have expressive and correct code...

ACCU 2019 Slides and Trip Report--Anthony Williams

Another one.

ACCU 2019 Slides and Trip Report

by Anthony Williams

From the article:

I attended ACCU 2019 a couple of weeks ago, where I was presenting my session Here's my number; call me, maybe. Callbacks in a multithreaded world.

The conference proper started on Wednesday, after a day of pre-conference workshops on the Tuesday, and continued until Saturday. I was only there Wednesday to Friday...

How to Iterate Through Directories in C++

Do you know how to iterate through directories in modern C++? How to work with std::filesystem to solve this task?

How to Iterate Through Directories in C++

by Bartlomiej Filipek

From the article:

How would you implement a function that searches for files with a given extension? For example, finding all text files? or *.cpp files? To code that solution you need a way to iterate through directories. Is that possible in C++ out of the box using the standard library? Let’s see some techniques and new elements that C++17 added.

ACCU - Trip Report--Ori Ben-Shir

Another one.

ACCU - Trip Report

by Ori Ben-Shir

From the article:

I was attending this year ACCU conference, and I am very eager to share my impression of the conference. ACCU is an annual conference located in the lovely city of Bristol. The conference is mostly dedicated to C++ developer. While C++ developers are in mind, the conference is not limited to C++ material, and it includes talks for various topics and even some other programming languages. Yes, there was a Rust talk and even a workshop this year.
It was the first time I have attended a big conference. And I must admit it was a great pleasure! I’m in love with the concept of technical talks. I find it to be the most effective learning method for me. The opportunity to meet a lot of tech enthusiastic is both fun and enriching. Wrapping it all with a vacation for such a lovely city such as Bristol is immensely satisfying. If you have the opportunity, I encourage you to attend this conference next year. I also think the organizers did a great job. I genuinely like the extra social session. The pub quiz, for instance, was perfect, though some of the code samples from it were as far from perfect as possible.

I have a lot to say about the content itself. I tend to believe I have more to say than you want to read. So let’s focus on some of the talks I think are more relevant...

ACCU 2019 trip report--Mathieu Ropert

Learn about what happened.

ACCU 2019 trip report

by Mathieu Ropert

From the article:

This year’s edition of ACCU was held from April 10th to April 13th, in Bristol as always. I arrived a day earlier from Paris after a short stop in France which was supposed to offer some supply of good weather and trips to a few winemakers in preparation for the harsh conditions of Great Britain.

From the start things went awry as I could only spare half an hour for a visit to a winemaker in Vouvray who turned out to be quite forgettable, not to mention the weather that was only barely keeping it up together. Still I didn’t immediately notice that something was off, having spent the pasts months enduring the cold winter of Sweden. It took a second flight from Paris to Bristol to realize it: spring is there (although a couple of Bristol locals apologized for the weather being unexpectedly non-terrible)...