Concepts at Compile-time
Let’s look at how different types of concepts are compiled.
We'll cover the following...
We'll cover the following...
How concepts are compiled
Because we have four different ways to use concepts with functions, we might ask ourselves how they are each compiled. Can there be such a subtle reason behind allowing all these different syntaxes?
Nothing is simpler than verifying that! Let’s start first with the code and then see what goes on behind the scenes.
Explanation
The first and third methods become the same.
template<>
int addRequiresClause<int>(int a, int b)
{
return a + ...