Exercise: Implement Arithmetic Concept

Implement the 'Arithmetic' concept applicable to a generic 'sum' function.

We'll cover the following

Challenge

Implement the concept, Arithmetic, so that you can use it in the generic sum function given below:

template <Arithmetic>
T sum(T a, T b) {
  return a + b;
}

Get hands-on with 1400+ tech skills courses.