fork download
  1. #include <iostream>
  2. #include <complex>
  3. using namespace std;
  4.  
  5. template <typename Type>
  6. Type add(Type first, Type second)
  7. {
  8. return first + second;
  9. }
  10.  
  11. int main() {
  12. auto resultC = add(std::complex<int>{1, 2}, std::complex<int>{2, 3});
  13. return 0;
  14. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty