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.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 689 entries already.
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.
Type erasure based on templates is a pretty sophisticated technique. It bridges dynamic polymorphism (object orientation) with static polymorphism (templates).
The registration for my mentoring program, “Fundamentals for C++ Professionals”, is still open until 17th April. The program starts on 22nd April.
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.
Before you participate in my mentoring program, you should know more about it. Today, I publish as a teaser, step six of the 28 steps to master C++.
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.
I’m happy to announce: The registration for my mentoring program is now open until the 17th of April.
Thanks to templates, there are new ways of software design. Policies and traits are two commonly used idioms in C++.
Expression templates are typically used in linear algebra and are “structures representing a computation at compile-time, which 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.
Get my 3-books bundle Modern C++ Collection for half the price ($66 -> $33).