#include #include template std::complex makeComplex(T a, U b){ return std::complex(a,b); } int main(){ std::complex a = makeComplex(4,5); std::complex b = makeComplex(3.0,5.2); std::complex c = makeComplex(1,5.2); std::cout << a << std::endl << b << std::endl << c << std::endl; }