I'm writing a simple complex number class in c++ and we're supposed to overload the four arithmetic operators to work on complex+-/*complex, complex+-*/double, and double+-*/complex.
This is easy enough, but I wanted to try and make it a little more generic and instead of coding for doubles, extending the functionality to any number.
Is there a facility in c++ for doing this?