fork(1) download
  1. template <typename T>
  2. class A;
  3.  
  4.  
  5. template <class T>
  6. class A
  7. {
  8. template<typename U>
  9. friend A<U> f(A<U> a);
  10. };
  11.  
  12. template <class T>
  13. A<T> f(A<T> a)
  14. {
  15. return A<T>();
  16. }
  17.  
  18.  
  19. int main()
  20. {
  21.  
  22. A<int> a, b;
  23. b = f(a);
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty