Using template specialization in C++
- by user550413
How can I write a function using template specialization that has 2 different input types and an output type:
template <class input1, class input2, class output>
and return the sum of the 2 numbers (integers/doubles). However, if I get 2 integers I want to return an integer type but for any other combinations of integer and double I'll…