I am trying to find template functions that do:
template <typename T>
T add(T lhs, T rhs) {
return lhs + rhs;
}
(for add, subtract, multiply, and divide).
I remember there being a standard set of functions for this– do you remember what they are?
In the header
<functional>, you’ll find things likestd::plus,std::minus,std::multiplies, andstd::divides.They’re not functions, either. They’re actually functors.