Contributions

Article
I presented in my last post "Parallel Algorithms of the STL with the GCC Compiler" the necessary theory about the C++17 algorithm. Today, I make a performance test using the Microsoft compiler and the GCC compiler to answer the simple question: Does the execution policy pay off?
Article
GCC supports my favorite C++17 feature: the parallel algorithms of the Standard Template Library (STL). I recognized this a few days ago, and I'm happy to write a post about it and share my enthusiasm.
Article
As you may know from my previous post Template Specialization, function template can only be full but not partial specialized. To make my long story short: Don't specialize function templates. Just use function overloading.
Article
After I presented in my last post Template Specialization the basics about template specialization, I dig today deeper. I want to present the partial and full specialization of a class template as a compile-time if.
Article
Templates define the behavior of families of classes or functions. Often it is required that special types or non-types may be treated special. To support this use case, you can specialize templates.
Article
In my last post Template Arguments, I wrote about function template type deduction (C++98) and auto type deduction (C++11). Today I wear more modern hats. I start with automatic type deduction of non-type template parameters and class templates (C++17) and finish with automatic type deduction of concepts (C++20).
Article
It is quite interesting how the compiler deduces the types for the template arguments. To make it short, you get most of the time the type you expect. The rules do not only apply to function templates (C++98) but also to auto (C++11), to class templates (C++17), and concepts (C++20).
Article
Today, I write about two topics: alias templates and template parameters. Alias templates are a way to give a name to a family of types. Template parameters can be types, non-types, and templates themselves.
Article
In my last post "Class Templates", I presented the basics about those. Today, I may surprise you with the inheritance of class templates and the instantiation of member functions of class templates.
Article
A function template represents a family of functions. Accordingly, a class template represents a family of classes. Today, I want to introduce class templates.
Article
In the last post "Function Templates", I wrote about the overloading of function templates and automatically deducing the return type of a function template. Today, I dive deeper and specify explicitly the template arguments of a function template and bring concepts into the play.
Article
A function template is a family of functions. In this post, I want to dive deeper into function templates.
Article
The idea of this post is quite simple. I want to visualize templates and, in particular, the process of template instantiation. Thanks to C++ Insights, this visualization is pretty easy.
Article
The future of C++ speaks templates, and so does my blog Modernes C++. Based on the poll of my last post "Quo Vadis - Modernes C++", my next presumably 50 - 100 posts explain the details to templates. In this post, I want to give you an idea of the upcoming posts.
Article
DONE: I have written almost 100 posts about C++20. Now, I want to ask you the question: What should be my next big topic? Make your choice in this poll.

Now, let me take about the future of Modernes C++. I have three ideas in my mind: C++23, extending and embedding Python with C/C++, and templates. The poll is open for one week including the 24.04. This means, in my next post I present your favorite and my plan to write about it.
Article
In my last post "Starting Jobs with Coroutines", I applied co_await to start a job. In this post, I improve the workflow and automatically resume a job if necessary. In my final step, I resume the job on a separate thread.
Article
C++20 has three new keywords to make a coroutine out of a function: co_return, co_yield, and co_await. co_await requires an Awaitable as arguments and starts the Awaiter workflow. Let me show in this post, what that means.
Article
In my last post in this mini-series to coroutines from the practical perspective, I presented the workflow of "An Infinite Data Stream with Coroutines in C++20". In this post, I use the generic potential of the data stream.
Article
In this post, I analyze the new keyword co_yield. Thanks to co_yield, you can create an infinite data stream in C++20.
Article
This post concludes my posts about co_return in C++20. I started with an eager future, continued with a lazy future. Today, I execute the future in a separate thread using coroutines as an implementation detail.
Article
Based on the coroutine-based implementation of a simple future in my last post "Implementing Simple Futures with Coroutines", I want to go today one big step further. I analyze the workflow of the simple future and make it lazy.
Article
Instead of return, a coroutine uses co_return returning its result. In this post, I want to implement a simple coroutine using co_return.
Update
What happens when you write without synchronization to std::cout? You get a mess. With C++20, this should not be anymore.
Article
What happens when you write without synchronization to std::cout? You get a mess. With C++20, this should not be anymore.
Article
std::jthread stands for joining thread. In addition to std::thread (C++11), std::jthread automatically joins in its destructor and can cooperatively be interrupted. Read in this post to know why std::jthread should be your first choice.
Article
A typical question in my C++ seminars is: Can A thread be killed?. Before C++20, my answer is no. With C++20, you can ask a thread politely for its interruption.
Article
In my last post, I introduced latches in C++20. A latch enables it threads to wait until a counter becomes zero. Additionally to a latch, its big sibling barrier can be used more than once. Today, I write about barriers and present atomic smart pointers.
Article
Latches and barriers are coordination types that enable some threads to wait until a counter becomes zero. You can use a std::latch only once, but you can use a std::barrier more than once. Today, I have a closer look at latches.
Article
Semaphores are a synchronization mechanism used to control concurrent access to a shared resource. They also allow it to play ping-pong.
Article
After the introduction to std::atomic_flag in my last post Synchronization with Atomics in C++20, I want to dive deeper. Today, I create a ping-pong game using condition variables, std::atomic_flag, and std::atomic. Let's play.

Showing the last 30 only...