Jonathan Boccara's blog

Algorithms on Ranges

Published December 7, 2018 - 5 Comments

In a lot of cases, using STL algorithms in C++ code allows to make it more expressive. However, some developers reported to me they had a hard time diffusing the usage of the STL in their companies, as their co-workers weren’t always keen on putting the STL in their daily coding toolbox. There were several […]

An Extraterrestrial Guide to C++ Formatting

Published December 4, 2018 - 0 Comments

Today’s guest post is written by Victor Zverovich. Victor is a software engineer at Facebook working on the Thrift RPC framework and the author of the popular {fmt} library, a subset of which is proposed into C++20 as a new formatting facility. He is passionate about open-source software, designing good APIs, and science fiction as […]

How to Design Function Parameters That Make Interfaces Easier to Use (3/3)

Published November 30, 2018 - 7 Comments

This is the final article in the series about function parameters. This series contains: Part 1: interface-level parameters, one-parameter functions, const parameters, Part 2: calling contexts, strong types, parameters order, Part 3: packing parameters, processes, levels of abstraction. To pack or not to pack? As a general rule, functions interfaces tend to become unclear when they […]

How to Design Function Parameters That Make Interfaces Easier to Use (2/3)

Published November 27, 2018 - 8 Comments

Let’s continue exploring how to design function parameters that help make both interfaces and their calling code more expressive. If you missed on the previous episode of this topic, here is what this series of articles contains: Part 1: interface-level parameters, one-parameter functions, const parameters, Part 2: calling contexts, strong types, parameters order, Part 3: packing […]

Deprecating and Deleting Functions in C++

Published November 20, 2018 - 0 Comments

Today’s guest post is written by Federico Kircheis, a (mainly C++) developer in Berlin, always looking for how to improve himself, and finding interesting problems to solve. Federico is the author of the article on Function poisoning in C++ on Fluent C++. In today’s article, he goes further and shows us how to delete functions […]

Fluent C++ is 2 Years Old

Published November 16, 2018 - 6 Comments

Another year has flown by. I opened Fluent C++ 2 years ago, and the first year anniversary seems to me like it was a few weeks ago. Time has gone by, but quite a few things have happened on the blog, and it’s time to make a little retrospective! Let’s come back on the highlights of […]

To DRY or not to DRY?

Published November 13, 2018 - 3 Comments

Today’s post is written by guest author Damien Beaufils. Damien is a passionate developer and a software crafter. Convinced that well-designed software is at least as important as working software, he works as a Tech Lead in agile projects, or as a trainer on software development practices such as Test Driven Development. You can find […]

How to Transfer unique_ptrs From a Set to Another Set

Published November 6, 2018 - 2 Comments
move unique_ptr C++ sets

Transferring a std::unique_ptr to another std::unique_ptr is an easy thing to do: std::unique_ptr<int> p1 = std::make_unique<int>(42); std::unique_ptr<int> p2; p2 = std::move(p1); // the contents of p1 have been transferred to p2 Easy peasy, lemon squeezy. Now what if those unique_ptrs are living inside of two sets? It should be just as easy to transfer those in the […]