By Jonathan Boccara :
Virtual, final and override in C++ - Fluent C++ | fluentcpp.com
C++11 added the keywords final and override. One of them is super useful, and the other one... not as much.
more...
Article Jonathan Boccara CPP Feb 21, 2020 1  
How to Make for_each Stop When a Condition Is True - Fluent C++ | fluentcpp.com
C++ STL's std::for_each algorithms applies a function to a whole sequence of elements. Here is how to make it stop after a condition is true on an element.
more...
Article Jonathan Boccara CPP Feb 18, 2020 1  
How to Make for_each Stop After N Elements - Fluent C++ | fluentcpp.com
To apply a function on the first N elements of a collection, the STL offers for_each_n. But we see more modern techniques that you should use instead.
more...
Article Jonathan Boccara CPP Feb 14, 2020 1  
Reverse For Loops in C++ - Fluent C++ | fluentcpp.com
Here are several ways, in C++20 and before, to iterate over a C++ collection in reverse order, with expressive code.
more...
Article Jonathan Boccara CPP Feb 11, 2020 1  
Various Ways of Applying a Function to the Elements of a Collection in C++ - Fluent C++ | fluentcpp.com
The transform adaptor is a very useful component, but is rarely available in C++ configs today. Here is how to emulate its usage.
more...
Article Jonathan Boccara CPP Feb 07, 2020 1  
My Interview on Software Engineering Radio - Fluent C++ | fluentcpp.com
I was on Software Engineering Radio to talk about working with and understanding legacy code!
more...
Article Jonathan Boccara CPP Feb 04, 2020 1  
How to Combine Functions with Logical Operators in C++ - Fluent C++ | fluentcpp.com
Combining several functions in C++ requires to use a lambda at best. This article shows 4 ways to combine functions with the help of generic components.
more...
Article Jonathan Boccara CPP Jan 31, 2020 1  
How to Short-Circuit a Sequence of Operations with a Boolean Value - Fluent C++ | fluentcpp.com
This article shows how to short-circuit code in C++ and to use the right operators so that the code doesn't have a unexepcted behaviour.
more...
Article Jonathan Boccara CPP Jan 28, 2020 1  
Mikado Refactoring with C++ Feature Macros - Fluent C++ | fluentcpp.com
The Mikado method is a powerful technique to achive large refactoring in safe steps. Here is a simple technique to use it in your C++ code.
more...
Article Jonathan Boccara CPP Jan 24, 2020 1  
Rockstool Interview - Fluent C++ | fluentcpp.com
Rockstool interviewed me to know more about my story.
more...
Article Jonathan Boccara CPP Jan 21, 2020 1  
How to Increment a Dynamic Bitset with the STL - Fluent C++ | fluentcpp.com
This article shows how to use the STL to increment a dynamic bitset with expressive code.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
The SoA Vector - Part 2: Implementation in C++ - Fluent C++ | fluentcpp.com
The SoA optimizes the cache when accessing one member of a structure in a collection. Here is how to implement the SoA in C++ to be compatible with the STL.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
Overview of std::map’s Insertion / Emplacement Methods in C++17 - Fluent C++ | fluentcpp.com
With C++17 2 new methods for insertion were added to the exiting ones (try_emplace, insert_or_assign). Here is an overview on how to insert in a map in C++.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
How to Define A Variadic Number of Arguments of the Same Type - Part 4 - Fluent C++ | fluentcpp.com
Sometimes, defining a variadic template with all arguments of the same types mess with overload resolution. Here is a library to fix this.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
The SoA Vector - Part 1: Optimizing the Traversal of a Collection - Fluent C++ | fluentcpp.com
Here is how to use the SoA to optimize caching and performance when accessing one member of a structure in a collection.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
Algorithms on Ranges - Fluent C++ | fluentcpp.com
Until they are in the standard, you should write your algorithms on ranges to simplify your code. Here we discuss how to pass collection to them.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
My Christmas Gift For You - Fluent C++ | fluentcpp.com
Expressive code in C++
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
Technical Debt Is like a Tetris Game - Fluent C++ | fluentcpp.com
Here is an analogy that can help you explain how bad in shapr some code is, and that a refactoring is necessary to make it evolve.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
No Raw For Loops: Assigning to a Data Member - Fluent C++ | fluentcpp.com
When a for loop assigns to a data member of the elements in a collection, we can't replace it with an STL algorithm. Here are alternatives, ranges and pipes
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
The Shapes of Code - Fluent C++ | fluentcpp.com
This article shows how to learn things about a piece of code just by looking at the shapes formed by its lines of code.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
Comparing C++ Containers with Lexicographical Comparison - Fluent C++ | fluentcpp.com
Lexigographical comparaison determines which one of two containers is smaller. Here is how to perform such comparisons in C++.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
Dry-comparisons: A C++ Library to Shorten Redundant If Statements - Fluent C++ | fluentcpp.com
This article presents dry-comparisons, a library to make if statements more expressive in C++.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
The Dangers of Coupling and How to Avoid Them - Fluent C++ | fluentcpp.com
Coupling is a fundamental notion in programming. Here is how to understand what it is, and think about how it relates to other programming princples.
more...
Article Jonathan Boccara CPP Jan 17, 2020 1  
Lower and Upper Bound Insert Iterators - Fluent C++ | fluentcpp.com
Here is a smart output iterator to insert several values inside of a sorted collection, with expressive code in C++.
more...
Article Jonathan Boccara CPP Dec 27, 2019 1  
A Free Ebook on C++ Smart Pointers - Fluent C++ | fluentcpp.com
C++ Smart Pointers: A free ebook that contains the basic, medium and advanced aspects of C++ smart pointers.
more...
Article Jonathan Boccara CPP Dec 25, 2018 1  
Named Arguments in C++ - Fluent C++ | fluentcpp.com
This article will show you how to implement named arguments in C++, such as f(firstName = "John", lastName = "Doe)
more...
Article Jonathan Boccara CPP Dec 14, 2018 1  

Featured Contributors

Jonathan Boccara
CPP ~   ..