add subtract multiply and divide template functions

c++, templates

Solution

In the header `<functional>`, you'll find things like `std::plus`, `std::minus`, `std::multiplies`, and `std::divides`.

They're not functions, either. They're actually functors.

Problem

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?

Original source

Related problems