#include template concept Addable = requires(Type lh, Type rh) { lh + rh; }; template concept Subtractable = true; //requires template Type add2(Type const &x, Type const &y) { return x + y; } template requires Addable Type add(Type const &x, Type const &y) { return x + y; } //= //multiple template requires Addable and Subtractable Type addsub(Type const &x, Type const &y, Type const &z) { return x + y - z; } //= //basicmath template concept BasicMath = Addable and Subtractable and requires(Type x, Type y) { x * y; }; //= //variadic template concept Variadic = requires(Types ...arguments) { true; }; //= template requires Subtractable Type addsub2(Type const &x, Type const &y, Type const &z) { return x + y - z; } using namespace std; int main() { add("one"s, "two"s); add2("one"s, "two"s); }