Introduction
Explore how to create your own C++ concepts starting from simple definitions. Understand how to combine concepts with logical operators and build constraints that enforce type safety in templates.
We'll cover the following...
We'll cover the following...
So far we’ve discussed the motivations behind C++ concepts and how to use them with functions and with classes. However, we’ve hardly written any ourselves. We defined a functionally incomplete concept called Number as an example, but that’s it. Now, we’ll go into the details about what kind of constraints we can express in a concept.
In this lesson, we’ll start from simple concepts and combine them with existing ones. Then, we’ll look at the required operations and general requirements on a class API.
Let’s begin!