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<T>).
static_assert allows you to check at compile time if a type T fulfills the Concept: static_assert(Concept<T>).
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.
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.
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.
In the last weeks; I learned something new about modules in C++20: private modules fragments and header units. Consequently, I make a short detour in this post and present these new features.
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 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.
In this post, I analyze the new keyword co_yield. Thanks to co_yield, you can create an infinite data stream in C++20.
Hunting
Today 2483
Yesterday 7881
Week 35138
Month 126292
All 9406315
Currently are 194 guests and no members online
Kubik-Rubik Joomla! Extensions
Read more...
Read more...