C++ Language/Templates/Concepts

Traditionally, a templated-function like  will allow substitution using any type (even types like   that actually shouldn't be "added together").

You can define a "concept", which is a logical criteria that only some types might satisfy:. Then we can limit allowed substitutions:.

Additional information about "concepts"