Function Templates
A function template is a family of functions. In this post, I want to dive deeper into function templates.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 702 entries already.
A function template is a family of functions. In this post, I want to dive deeper into function templates.
The idea of this post is quite simple. I want to visualize templates and, in particular, the template instantiation process. Thanks to C++ Insights, this visualization is pretty straightforward.
I have two great news. First, you have my C++20 on Amazon and second, you can download the source code on GitHub.
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 of templates. I want to give you an idea of the upcoming posts in this post.
DONE: I have written almost 100 posts about C++20. Now, I want to ask you: What should be my next big topic? Make your choice in this poll.
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.
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.
In my last post in this mini-series on 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.
In this post, I analyze the new keyword co_yield. Thanks to co_yield, you can create an infinite data stream in C++20.
This post concludes my posts about co_return in C++20. I started with an eager future, and continued with a lazy future. Today, I execute the future in a separate thread using coroutines as an implementation detail.
