fork download
  1. template <class T> struct B;
  2.  
  3. template <class T> B<T> operator+(const B<T>&);
  4. template <class T>
  5. struct B
  6. {
  7. B() {}
  8. friend B operator+<T>(const B&);
  9. };
  10.  
  11. template <class T> B<T> operator+(const B<T>&)
  12. {
  13. return B<T>();
  14. }
  15.  
  16. int main()
  17. {
  18. B<int> b;
  19. +b;
  20. }
  21.  
  22.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty