Contributions

Article
The classics "Design Patterns: Elements of Reusable Object-Oriented Software", and "Pattern-Oriented Software Architecture, Volume 1" use similar steps to present their pattern. Today, I will present this structure of a pattern.
Article
In my last post, I presented the classification of design patterns based on the seminal book "Design Patterns: Elements of Reusable Object-Oriented Software". Today, I present are more general classification of patterns based on the second seminal book "Pattern-Oriented Software Architecture, Volume 1".
Article
Patterns can be classified in various ways. The most prominent ones are the ones used in the books "Design Patterns: Elements of Reusable Object-Oriented Software" and "Pattern-Oriented Software Architecture, Volume 1".
Article
Most software developers assume that the book "Design Patterns: Elements of Reusable Object-Oriented Software", published in 1994, stands for the birth of patterns. No. The term was coined by Christopher Alexander in 1977.
Article
Before I write about patterns in my upcoming posts, I have to answer one question first. What are the advantages of patterns? As you may assume, I see many advantages, but I boil them down to three points: well-defined terminology, improved documentation, and learning from the best.
Article
Based on my last poll, "Which mentoring program should I implement next?" I recognized that there is a significant demand for writing about "Design Patterns and Architectural Patterns with C++". Today, I would like to present to you my plan for future posts.
Article
Thanks to C++23, constructing containers will become more convenient. Additionally, the ranges library got more new views.
Article
There are more reasons to prefer ranges library above the classical Standard Template Library. The ranges iterators support unified lookup rules and provide additional safety guarantees.
Article
The ranges library in C++20 supports sentinels. Sentinels stand for the end of a range and can be regarded as generalized end iterators.
Article
The algorithms of the ranges library are lazy, can work directly on the container, and can easily be composed. But they have more to offer: projections. A projection is a mapping of a set into a subset. Let me show you in this post what that means:
Article
Thanks to the ranges library, working with the Standard Template Library (STL) is much more comfortable and powerful. The algorithms of the ranges library are lazy, can work directly on the container, and can easily be composed. But there is more to it:
Article
Concepts are a powerful and elegant tool to check at compile time if a type fulfills. Thanks to static_assert, you can use concepts as a standalone feature: static_assert(Concept).
Article
static_assert allows you to check at compile time if a type T fulfills the Concept: static_assert(Concept).
Article
In my last post "Defining Concepts with Requires Expressions", I exemplified how you can use requires expressions to define concepts. Requires expressions can also be used as a standalone feature when a compile-time predicate is required.
Article
In my last post "Define Concepts", I defined the concepts Integral, SignedIntegral, and UnsigendIntegral using logical combinations of existing concepts and compile-time predicates. Today, I use Requires Expressions to define concepts.
Article
There are two ways to define a concept: You can combine existing concepts and compile-time predicates, or you can apply a requires expression in four different ways.
Article
Type erasure based on templates is a pretty sophisticated technique. It allows you to bridge dynamic polymorphism (object orientation) with static polymorphism (templates).
Article
In my last post, I presented a possible std::advance implementation based on tag dispatching. One of my readers mentioned that I could also implement std::advance based on constexpr if, or concepts. His right. So let's do it.
Article
Tag Dispatching enables it to choose a function based on the type characteristics. This decision takes place at compile time and is based on traits.
Article
Thanks to templates, there are new ways of software design. Policies and traits are two commonly used idioms in C++.
Article
Expression templates are typically used in linear algebra and are "structures representing a computation at compile-time, which structures are evaluated only as needed to produce efficient code for the entire computation" (https://en.wikipedia.org/wiki/Expression_templates). In other words, expression templates are only evaluated when needed.
Article
In my previous post "More about Dynamic and Static Polymorphism", I used the Curiously Recurring Template Pattern (CRTP) to implement static polymorphism. Another typical use case for CRTP are mixins.
Article
In my last post "Dynamic and Static Polymorphism", I introduced dynamic polymorphism. Today, I continue with static polymorphism and present are very interesting idiom in C++: curiously recurring template pattern (CRTP).
Article
Polymorphism is the property that different types support the same interface. In C++, we distinguish between dynamic polymorphism and static polymorphism.
Article
In today's post, I want to introduce a very interesting C++17 feature: constexpr if. constexpr if enables it to conditionally compile source code and can also be used for nice tricks at compile time.
Article
With C++20, constexpr became way more powerful. Additionally, we have consteval functions in C++20 that are quite similar to constexpr functions.
Article
Today, I continue my story about programming at compile time. After template metaprogramming, the type-traits library, today's topic is constexpr functions in particular.
Article
This post ends the mini-series about the dining philosophers problem by Andre Adrian. Today, he applies powerful locks and semaphores.
Article
In the last post "Dining Philosophers Problem I", Andre Adrian started his analysis of the classical dining philosophers' problem. Today, he uses atomics, mutexes, and locks.
Article
At Christmas time, I had a few nice discussions with Andre Adrian. He solved the classical dining philosopher's problem in various ways using modern C++. I'm convinced him to write an article about this classic synchronization issue, and I'm happy to publish it in three consecutive posts.

Showing the last 30 only...