Requirements on Operations

Get an overview of the requirements on the operations in C++ concepts.

We'll cover the following

Now that we’ve seen some important rules, let’s continue our quest to write our own concepts.

Concept for addable operands

Let’s suppose that we require a template parameter that supports a certain operation or operator.

If we require that template parameters can be added together, then we can create a concept for that:

Get hands-on with 1400+ tech skills courses.