Fluent C++
Jonathan Boccara's blog
- Posts
- 443 from 4 Nov 2016 to 25 Jun 2022
- Posting
- quiet since 2022
- Kind
- personal blog
- Feed
- https://www.fluentcpp.com/feed/
2022 11
- Usage First, Implementation After: A Principle of Software Development
- Design Patterns VS Design Principles: Factory method
- How to Store an lvalue or an rvalue in the Same Object
- Copy-Paste Developments
- Design Patterns VS Design Principles: Abstract Factory
- How to Generate All the Combinations from Several Collections
- Code It Yourself: Generate All the Combinations from Several Collections
- A Good Way to Handle Errors Is To Prevent Them from Happening in the First Place
- Design Patterns VS Design Principles: Visitor
- Which Programming Paradigm Gives the Most Expressive Code?
- The Interesting Evolution of std::equal_range
2021 45
- A Simple Habit to Avoid Complex Names and Typos in Code
- The Evolutions of Lambdas in C++14, C++17 and C++20
- How to Quickly Understand the Code of a Function
- Design Patterns VS Design Principles: Template Method
- CPPP – An international C++ Conference with a hint of French accent
- Strong Types for Safe Indexing in Collections – Part 2
- Strong Types for Safe Indexing in Collections – Part 1
- Design Patterns VS Design Principles: Observer, State and Strategy
- A Recap on User Defined Literals
- A Case Study for the Quickest Way to Find the Source of a Bug
- 3 Steps to Find the Source of a Bug Quickly
- Design Patterns VS Design Principles: Iterator, Mediator and Memento
- How to Make Your Classes Compatible with Range for Loop
- How to Define Comparison Operators by Default in C++
- How Template Template Parameters Can Simplify Template Classes
- Don’t Let Legacy Code Make You Suffer. Make It Suffer
- Design Patterns VS Design Principles: Chain of responsibility, Command and Interpreter
- Extended Aggregate Initialisation in C++17
- How to Return Several Values from a Function in C++
- Minor, Major and Overarching Design Principles
- GRASP: 9 Must-Know Design Principles for Code
- 5 Tips to Find Your Way Around A Legacy Codebase
- How to Define A Variadic Number of Arguments of the Same Type – Part 5
- How to Insert Several Elements in a Vector (With No Memory Errors)
- The Subtle Dangers of Temporaries in for Loops
- A Default Value to Dereference Null Pointers
- Find with Custom Returns
- How to Implement std::conjunction and std::disjunction in C++11
- Make Bad Code Look Bad
- Trailing Return Types
- Open Question: Should the Logging Code Be with the Main Code?
- What auto&& means
- “Can’t” Is No Word for Software Developers
- What C++ Fold Expressions Can Bring to Your Code
- C++ Fold Expressions 101
- std::index_sequence and its Improvement in C++20
- C++ Concepts: More than Syntactic Requirements
- A Recap on string_view
- 6 Tips to Make Your Development Project More Likely to Succeed
- How std::any Works
- Inheritance Without Pointers
- How to Pass a Variadic Pack as a First Argument of a Function in C++
- 4 Features of Boost HOF That Will Make Your Code Simpler
- Infix Function Calls with Boost HOF
- Include What You Use
2020 63
- Fluent C++ is 4 Years Old
- On Design Patterns in C++
- A Classic Compilation Error with Dependent Types
- Auto for Types, but Not for Concepts
- A Map with Two Types of Keys in C++
- Announcing the Fluent C++ Store
- How Lambdas Make Function Extraction Safer
- How to Make a Copyable Object Assignable in C++
- How to Write Expressive Class Definitions
- An Attempt to Write Fallbacks With Expressive Code
- The differences between tie, make_tuple, forward_as_tuple: How to Build a Tuple in C++?
- Adapting STL Algorithms on Sets
- How to Implement operator= When a Data Member Is a Lambda
- std::exchange Patterns: Fast, Safe, Expressive, and Probably Underused
- What std::exchange does, and how to remember it
- Replacing CRTP Static Polymorphism With Concepts
- Make Your September Matter
- Use Private Inheritance to Restrict Interfaces
- Algorithms on Sets That Return a Boolean: Strong Templates Interface
- Algorithms on Sets That Return a Boolean: Implementing the Generic Algorithm
- If you see cut-paste, it is rotate
- Algorithms on Sets That Return a Boolean: Exploring the algorithms
- STL Algorithms on Sets: One Algorithm to Implement Them All
- Implementing set_match in One Line of Code
- set_match: Matching up Elements Between Sorted Collections
- How to Check If 2 Sorted Collections Have a Common Element
- A Universal Reference Wrapper
- Great Developers Don’t Just Write Great Code
- A Generic Component for Out-of-line Lambdas
- Out-of-line Lambdas
- Going Far into Polymorphic Helpers
- How to Assign Derived Classes in C++
- Runtime Polymorphism Without Objects or Virtual Functions
- Evaluating user-defined logical expressions
- How to Modify a Key in a C++ Map or Set
- Else Before If
- How to Extract Words among Spaces in a C++ String
- An Online Source Code Control Flow Filter
- Implementing a Line Filter by Using C++ Ranges
- Implementing a Line Filter in C++
- See you on Friday
- How Can Developers Help Fight Coronavirus?
- How to Get the “Table of Contents” Of a Long Function
- 3 Types of Toxic Software Projects
- How to Pass Class Member Functions to STL Algorithms
- Checking the Values of a Collection in a Unit Test in C++
- C++ Regex 101
- Coding Styles With Exotic Constraints
- Virtual, final and override in C++
- How to Make for_each Stop When a Condition Is True
- How to Make for_each Stop After N Elements
- Reverse For Loops in C++
- Various Ways of Applying a Function to the Elements of a Collection in C++
- My Interview on Software Engineering Radio
- How to Combine Functions with Logical Operators in C++
- How to Short-Circuit a Sequence of Operations with a Boolean Value
- Mikado Refactoring with C++ Feature Macros
- Rockstool Interview
- Technical Debt Is like a Tetris Game
- The Shapes of Code
- No Raw For Loops: Assigning to a Data Member
- How to Define A Variadic Number of Arguments of the Same Type – Part 4
- Dry-comparisons: A C++ Library to Shorten Redundant If Statements
2019 105
- The Dangers of Coupling and How to Avoid Them
- Lower and Upper Bound Insert Iterators
- My Christmas Gift For You
- Comparing C++ Containers with Lexicographical Comparison
- How to Increment a Dynamic Bitset with the STL
- How to Write a Condition With Interdependent Variables
- Don’t Make Your Interfaces *Deceptively* Simple
- My Book on Legacy Code is on Amazon
- Inserting Values to a Map with Boost.Assign
- Appending Values to a Vector with Boost.Assign
- NEW! Get a Mini-Ebook on a C++ Topic Every Month
- How C++17 Benefits from Boost Libraries, Part Two
- How C++17 Benefits from Boost Libraries, Part One
- 5 Ways Using Braces Can Make Your C++ Code More Expressive
- Fluent C++ Is 3 Years Old
- New Pipes + a Video Tutorial to Make More Pipes
- Mux: Zip Without Tuples
- Transforming Deeply Nested Loops With STL Algorithms
- std::less and its Modern Evolutions
- A Tree of Pipes
- A Pipe Operator for the Pipes Library?
- Piping To and From a Stream
- How to Merge Consecutive Elements in a C++ Collection
- Code It Yourself: Merging Consecutive Elements in a C++ Collection
- My Leanpub Interview
- How to Create Your Own C++ Pipe
- Reducing the Code to Create a Pipe in the Pipes Library
- How to Check If an Inserted Object Was Already in a Map (with Expressive Code)
- Expressive Code for State Machines in C++
- Composite Pipes, part 2: Implementing Composite Pipes
- Composite Pipes, part 1: Decoupling Operators From Classes
- The Surprising Limitations of C++ Ranges Beyond Trivial Cases
- Good News for the Pipes Library: pipes::funnel Is Now Gone
- I Don’t Know What You Did Last Summer
- The Demux Pipe
- How to Disable a Warning in C++
- Extract Function: Should I Extract the Condition Too?
- How to Make SFINAE Pretty and Robust
- A Concise Implementation of Fizzbuzz with std::optional
- Making C++ Pipes Compatible with STL Algorithms
- Smart Output Iterators >>= become(Pipes)
- Combining Ranges and Smart Output Iterators
- Chaining Output Iterators Into a Pipeline
- My C++Now Talk on Smart Output Iterators
- Why Static Analysis Can Improve a Complex C++ Codebase
- Strong Types on Collections
- What Every C++ Developer Should Know to (Correctly) Define Global Constants
- Expressiveness, Nullable Types, and Composition (Part 2)
- Expressiveness, Nullable Types, and Composition (Part 1)
- auto + const + smart pointer = bad mix?
- You Should Refuse to Develop What You Don’t Understand
- FSeam: A Mocking Framework That Requires No Change In Code (Part 2)
- FSeam: A Mocking Framework That Requires No Change In Code (Part 1)
- How to Use is_permutation on Collections of Different Types
- Understanding the implementation of std::is_permutation
- The Cons and Cons of the Hungarian Notation
- The Shortest Name There Is
- Should Private Methods Always Be Const?
- Why You Should Separate Commands from Queries
- Write Your Own Dependency-Injection Container
- Get Better with Legacy Code This Summer (Limited Offer)
- The Difference Between std::copy_backward and std::copy with Reverse Iterators
- Better Macros, Better Flags
- How to Generate a Collection of Random Numbers in Modern C++
- The Expressive Absence of Code
- How to Check If a String Is a Prefix of Another One in C++
- 3 Types of Macros That Improve C++ Code
- How to Send an STL Collection to a Curried Object
- How to Output Strings Separated by Commas in C++
- Curried Objects in C++
- The Common Vocabulary of Software Developers
- Beyond Locks, a Safer and More Expressive Way to Deal with Mutexes in C++
- The Rule of Zero in C++
- Compiler-generated Functions, Rule of Three and Rule of Five
- An Alternative Design to Iterators and Ranges, Using std::optional
- Cppp
- How to Emulate the Spaceship Operator Before C++20 with CRTP
- The BooSTL Algorithms: Boost Algorithms That Extend the STL (3/3)
- The BooSTL Algorithms: Boost Algorithms That Extend the STL (2/3)
- The BooSTL Algorithms: Boost Algorithms That Extend the STL (1/3)
- 10 Code Smells a Static Analyser Can Locate in a Codebase
- Generalizing Unordered Named Arguments
- Anna
- Performance benchmark: Ranges VS STL algorithms VS Smart output iterators
- The Demultiplexer Iterator: Routing Data to Any Numbers of Outputs
- STL Algorithms on Tuples
- for_each_arg: Applying a Function to Each Argument of a Function in C++
- Partitioning Data with Output Iterators in C++
- Is Unzip a Special Case of Transform?
- Applying Several Transforms in One Pass on a Collection
- Unzipping a Collection of Tuples with the “unzip” Smart Output Iterator
- How Smart Output Iterators Avoid the TPOIASI
- The Terrible Problem Of Incrementing A Smart Iterator
- Why You Should Use std::for_each over Range-based For Loops
- How to Define A Variadic Number of Arguments of the Same Type – Part 3
- The Legacy Code Programmer’s Toolbox is Out
- How to Define A Variadic Number of Arguments of the Same Type – Part 2
- How to Define a Variadic Number of Arguments of the Same Type – Part 1
- The Pitfalls of Aliasing Pointers in Modern C++
- Declarative If Statements with a Simplified Rules Engine
- Indexing Data Structures with C++ Scoped Enums
- How I Applied Coding Best Practices to Improve My Daily Life
- RestMyCase: A C++ Library for Formatting String Cases
- Functional Programming Is Not a Silver Bullet
- TODO_BEFORE(): A Cleaner Codebase for 2019
2018 104
- A Simple Timer in C++
- A Free Ebook on C++ Smart Pointers
- The SoA Vector – Part 2: Implementation in C++
- The SoA Vector – Part 1: Optimizing the Traversal of a Collection
- Named Arguments in C++
- Overview of std::map’s Insertion / Emplacement Methods in C++17
- Algorithms on Ranges
- An Extraterrestrial Guide to C++ Formatting
- How to Design Function Parameters That Make Interfaces Easier to Use (3/3)
- How to Design Function Parameters That Make Interfaces Easier to Use (2/3)
- How to Design Function Parameters That Make Interfaces Easier to Use (1/3)
- Deprecating and Deleting Functions in C++
- Fluent C++ is 2 Years Old
- To DRY or not to DRY?
- How to Retrieve the Firsts from a Collection of Pairs
- How to Transfer unique_ptrs From a Set to Another Set
- How to Store a Variable Number of Objects Known at Compile Time in C++
- A Case Where Using Auto Leads to Undefined Behaviour
- How to Access the Index of the Current Element in a Modern For Loop
- Word Counting in C++: Computing the Span of a Word
- Word Counting in C++: Parametrizing the Type of Case
- Word Counting in C++: Extracting words from camelCase symbols
- Word Counting in C++: Implementing a Simple Word Counter
- 3 Things That Counting Words Can Reveal on Your Code
- Why Optional References Didn’t Make It In C++17
- Pointers, References and Optional References in C++
- “auto to stick” and Changing Your Style
- How to Remove Duplicates from an Associative Container in C++
- How to Remove Elements from an Associative Container in C++
- How to Remove Pointers from a Vector in C++
- How to Remove Elements from a Sequence Container in C++
- How to Write Simple Code to Accomplish Complex Tasks
- How to Deal with Values That Are Both Input and Output
- Function Poisoning in C++
- Modern C++: 7 Ways to Fake It Until You Have It
- Removing Duplicates in C++ CRTP Base Classes
- How to Design Early Returns in C++ (Based on Procedural Programming)
- Integrating Mocking With C++ Default Parameters
- Implementing Default Parameters That Depend on Other Parameters in C++
- Defaulted: A Helper to Work Around the Constraints of C++ Default Parameters
- Default Parameters With Default Template Parameters Types
- Should I Use Overloads or Default Parameters?
- Default Parameters in C++: The Facts (Including Secret Ones)
- Getting Along With The Comma Operator in C++
- How to *Efficiently* Convert a String to an int in C++
- How to Convert a String to an int in C++
- Simplicity in C++ Code (Podcast)
- How to Construct C++ Objects Without Making Copies
- The Incredible Const Reference That Isn’t Const
- 105 STL Algorithms in Less Than an Hour
- The World Map of C++ STL Algorithms
- How to Reduce the Code Bloat of a Variadic CRTP
- 7 More Ways to Get Better at C++ This Summer (2018 Edition)
- Variadic CRTP Packs: From Opt-in Skills to Opt-in Skillsets
- Variadic CRTP: An Opt-in for Class Features, at Compile Time
- 3 Simple C++17 Features That Will Make Your Code Simpler
- Should structs Have Constructors in C++
- Triple trip report from ACCU, C++ Russia and C++Now 2018 – Part 2
- Triple trip report from ACCU, C++ Russia and C++Now 2018 – Part 1
- 10 Techniques That Will Make You Understand Other People’s Code Better
- Fluent C++ is open to guest posting
- A Concrete Example of Naming Consistency
- Beautiful Pieces of Code That Print 42 for Towel Day
- How to Turn a Hierarchy of Virtual Methods into a CRTP
- How to Make SFINAE Pretty – Part 2: the Hidden Beauty of SFINAE
- How to Make SFINAE Pretty – Part 1: What SFINAE Brings to Code
- The Most Beautiful Piece of Code That Prints 42
- std::iterator is deprecated: Why, What It Was, and What to Use Instead
- Passing Booleans to an Interface in an Expressive Way
- When to Use Enums and When to Use Tag Dispatching in C++
- How to Use Tag Dispatching In Your Code Effectively
- Make Your Containers Follow the Conventions of the STL
- How to Reorder A Collection With the STL
- How to Pass a Polymorphic Object to an STL Algorithm
- Moving Ranges Around with STL Algorithms
- Which One Is Better: Map of Vectors, or Multimap?
- Getting the Benefits of Strong Typing in C++ at a Fraction of the Cost
- C++ Will No Longer Have Pointers
- Is std::for_each obsolete?
- Buy me a beer for Fluent C++
- What Heaps Can Do That Priority Queues Don’t
- Heaps and Priority Queues in C++ – Part 3: Queues and Priority Queues
- Building, Unbuilding and Sorting Heaps in C++ with the STL
- Heaps and Priority Queues in C++ – Part 1: Heaps Basics
- The C++ Metaclasses Proposal in Less Than 5 Minutes
- The Issues With Singletons and How to Fix Them
- How to Choose Between Struct or Class
- Replacing an Else-if Sequence With a Ternary Operator
- Introduction to Boost Karma
- On Using Guards in C++
- The Right Question for the Right Name
- To RAII or Not to RAII?
- Introduction to the C++ Ranges Library
- Understanding lvalues, rvalues and their references
- Strong Types For Strong Interfaces: my talk at Meeting C++
- The Most Vexing Parse: How to Spot It and Fix It Quickly
- Introduction to Boost Phoenix
- How to Be Clear About What Your Functions Return
- 5 Tips to Understand Legacy Code
- Strong Optionals
- How is std::set_difference Implemented?
- Strong Templates
- Making Strong Types Implicitly Convertible
- 7 Good Resolutions to Write Better Code This Year
2017 104
- STL Algorithms on Sets
- How to Emulate The “super” Keyword In C++
- Why Expressive Code Matters
- The Complete Guide to Building Strings In C++: From “Hello World” Up To Boost Karma
- More Tips On Naming
- Mixin Classes: The Yang of the CRTP
- Make Your Functions Functional!
- A Minimal Interface: Both Expressive And Fast Code
- 7 Names We Should Never See in Code
- Smart Output Iterators: A Symmetrical Approach to Range Adaptors
- How to Use the STL With Legacy Output Collections
- Using Bad Code to Learn How to Write Good Code
- Fluent C++ Is 1 Year Old
- Getting Inspired by Good Code
- Using Strong Types to Return Multiple Values
- Calling Functions and Methods on Strong Types
- How Unit Tests Help Express Your Code’s Intent
- 10 Halloween Horror Code Stories That Will Freak You Out
- Function Aliases In C++
- The Results of the Expressive C++17 Coding Challenge
- Think of Function Objects as Functions Rather Than Objects
- (std::)Accumulate Knowledge On STL Algorithms
- Size and Capacity of STL Containers
- Partitioning with the STL
- How the STL inserter iterator really works
- Sorting with the STL algorithms
- tee: Debug Info With Little Impact On Code
- The Expressive C++17 Coding Challenge
- How to implement the pimpl idiom by using unique_ptr
- Cppcast: A Show for All C++ Developers
- Spread Knowledge in Your Company with Your “Daily C++”
- How to Return a Smart Pointer AND Use Covariance
- Polymorphic clones in modern C++
- Changing deleters during the life of a unique_ptr (4/7)
- How to Make Custom Deleters More Expressive
- Smart developers use smart pointers (3/7) – Custom deleters
- unique_ptr, shared_ptr, weak_ptr, scoped_ptr, raw pointers – Knowing your smart pointers (2/7)
- Smart developers use smart pointers (1/7) – Smart pointers basics
- How to Handle Multiple Types in Max Without A Cast
- Function Templates Partial Specialization in C++
- Template Partial Specialization In C++
- Metaclasses, the Ultimate Answer to Strong Typing in C++?
- A Summary of the Metaclasses Proposal for C++
- How to Use Overloaded Functions With The STL
- What Books to Read to Get Better In C++
- Do Understandable If Statements Run Slower?
- How to Make If Statements More Understandable
- Can You Wield C++ Function Overloading Like Jon Snow Wields Longclaw?
- The Vector Monad in C++, Without the Ugly Stuff
- Dealing with Multiple Paths with the Vector Monad in C++
- The Optional Monad In C++, Without the Ugly Stuff
- Multiple error handling with the optional monad in C++
- How to Insulate a Toxic Api from the Rest of Your Code
- How to Flatten Out A Nested Switch Statement
- 7 Ways to Get Better at C++ During this Summer
- The Interface Principle in C++
- The Right Attitude to Deal with Legacy Code
- The real difference between struct and class
- is_transparent: How to search a C++ set with another type than its key
- Using toString on Custom Types in C++
- Expressive C++ Template Metaprogramming
- Making Strong Types Hashable
- Strong Units Conversions
- Strong types: inheriting the underlying type’s functionalities
- An Implementation Helper For The Curiously Recurring Template Pattern
- What the Curiously Recurring Template Pattern can bring to your code
- The Curiously Recurring Template Pattern (CRTP)
- How Compact Code Can Become Buggy Code: Getting Caught By The Order of Evaluations
- Good news: strong types are (mostly) free in C++
- To comment or not to comment? // that is the question
- The “Extract Interface” refactoring, at compile time
- Move iterators: where the STL meets Move semantics
- How to split a string in C++
- The design of the STL
- Understand ranges better with the new Cartesian Product adaptor
- Mins and Maxes with the STL
- Restricting an interface in C++
- The Dailies: how to efficiently teach C++ at work
- How typed C++ is, and why it matters
- Inserting several elements into an STL container efficiently
- Filling <algorithm>s of the STL
- A smart iterator for aggregating new elements with existing ones in a map or a set
- A smart iterator for inserting into a sorted container in C++
- The Pi Day Challenge for the Most Expressive Code – Results
- Functors are not dead: the double functor trick
- Passing strong types by reference
- The Pi Day Challenge For The Most Expressive Code In C++
- 50 People’s Opinions About How To Get Better As A Software Developer
- Predicates on ranges with the STL
- Strong lambdas: strong typing over generic types
- Custom comparison, equality and equivalence with the STL
- std::transform, a central algorithm
- set_aggregate, set_segregate: higher-level algorithms on sets
- What 70 people came up with on expressive code
- The searching <algorithm>s the STL holds secret
- How to choose good names in your code
- Searching when you have access to an STL container
- STL Function objects: Stateless is Stressless
- Making code expressive with lambdas
- How to (std::)find something efficiently with the STL
- Ranges: the STL to the Next Level
- Know your algorithms: algos on sets
- The importance of knowing STL <algorithm>s
- Super expressive code by Raising Levels of Abstraction
2016 11
- Can you write expressive code? – Christmas break challenge
- It all comes down to respecting levels of abstraction
- Passing strong types by reference – First attempt
- Strong types for strong interfaces
- Strongly typed constructors
- Partial queries with optional<T>
- Return value optimizations
- Clearer interfaces with optional<T>
- Make your functions functional
- How I came to create Fluent C++
- Becoming Fluent in C++