Jonathan Boccara's blog

How C++17 Benefits from Boost Libraries, Part Two

Published November 22, 2019 - 0 Comments
boost C++17

Today we have a second guest post by Bartlomiej Filipek. Bartek is a C++ programmer, blogger and author. You can find him on LinkedIn or his blog and also read his book. Last time in our series about Boost and C++17 we covered several features: std::optional, std::variant, std::any and string_view. This time we’ll go through […]

How C++17 Benefits from Boost Libraries, Part One

Published November 19, 2019 - 0 Comments
boost C++17

Today we have a guest post by Bartlomiej Filipek. Bartek is a C++ programmer, blogger and author. You can find him on LinkedIn or his blog and also read his book. In today’s article, I’ll show you battle-tested features from the well-known Boost libraries that were adapted into C++17. With the growing number of elements […]

Fluent C++ Is 3 Years Old

Published November 12, 2019 - 0 Comments

As Frédéric Beigbeder has it, Love Lasts Three Years. Let’s hope that a blog lasts longer than that because… Fluent C++ is 3 years old! Three years. That sounds like a long time, especially if we think about in terms of number of posts. With two posts a week for three years, that makes more […]

New Pipes + a Video Tutorial to Make More Pipes

Published November 8, 2019 - 0 Comments

The pipes library got 4 more pipes: take, take_while, drop and drop_while. We’re going to see what those new pipes do, and then a video of how I implemented them that can serve as a guide to implement more. take and take_while The take and take_while pipes are equivalent to their range adaptor counterparts: they let through the first […]

Mux: Zip Without Tuples

Published November 5, 2019 - 0 Comments

C++ offers many ways to operate on the elements of a collection. But what about operating on the elements of two collections? There is an STL algorithm that can take two collections: std::transform. For example, if we want to multiply the respective elements of two collections we can use std::transform like this: auto const inputs1 = std::vector<int>{1, […]

Transforming Deeply Nested Loops With STL Algorithms

Published November 1, 2019 - 0 Comments

This is a guest post written by Gary Taverner. Gary works for Marlan Maritime Ltd, a company concerned with maritime safety and the monitoring/mapping/management of changing coastline using radar. In this article we examine some code that was difficult to understand only a week after it was written, and how by using the STL it […]

std::less and its Modern Evolutions

Published October 29, 2019 - 0 Comments

Since C++98, the C++ standard library has provided std::less, a little component that concisely expresses that you want to use operator< to perform comparisons. std::less is a template class, conceptually equivalent to this: template<typename T> struct less { bool operator()(T const& lhs, T const& rhs) { return lhs < rhs; } }; Let’s see how std::less, as well […]

A Tree of Pipes

Published October 25, 2019 - 0 Comments

Today we have a guest post by Till Heinzel. Till is a physicist-turned-software engineer with a focus on code quality and a passion for C++, particularly the metaprogramming. You can find Till on LinkedIn or on his shiny new blog. Pipes are pretty neat, don’t you think? They are a great metaphor for what they […]

A Pipe Operator for the Pipes Library?

Published October 22, 2019 - 0 Comments

So far, the components of the pipes library could be assembled with operator>>=: myVector >>= pipes::transform(f) >>= pipes::filter(p) >>= pipes::demux(pipes::transform(g) >>= pipes::push_back(output1), pipes::filter(q) >>= pipes::push_back(output2)); Until recently, I thought that using operator| was impossible. But thanks to a suggestion from Fluent C++ reader Daniel and to a refactoring of the library to decouple operators from classes, […]