fork(1) download
  1. #include <iostream>
  2. template <typename T>
  3. class A {};
  4.  
  5. template <typename T, typename T2>
  6. int hello(A<T> a, A<T2> b, int c)
  7. {
  8. return 69;
  9. }
  10. int hello(int, int, int){ return 42; }
  11.  
  12.  
  13. int main()
  14. {
  15. A<int> a;
  16. A<float> b;
  17.  
  18. decltype(hello(a,b,3)) (*pf)(decltype(a), decltype(b), decltype(3))=hello;
  19. std::cout << (void*)pf << "\n";
  20. std::cout << pf(a,b,3) << "\n";
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
0x8048730
69