fork(1) download
  1.  
  2. #include <iostream>
  3.  
  4. template <typename T>
  5. struct A
  6. {
  7. friend void f(T x)
  8. {
  9. std::cout << "A\n";
  10. }
  11. operator int(){return 1;}
  12. };
  13.  
  14. int main()
  15. {
  16. //f(new A<void*>());
  17. //f(A());
  18. f(A<int>());
  19.  
  20. }
  21.  
  22.  
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
A