fork(1) download
  1. template <class T> class A;
  2. template <class T, class U>
  3. void operator*(A<T>, A<U>);
  4.  
  5. template <class T>
  6. class A {
  7. friend void ::operator*<>(A<T>, A<T>);
  8. void friends_only();
  9. };
  10.  
  11. template <class T, class U>
  12. void operator*(A<T> a, A<U>) {
  13. a.friends_only();
  14. }
  15.  
  16. int m()
  17. {
  18. A<int> a;
  19. A<void> b;
  20. a*a;
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
/home/4bZ4aY/ccWW6un1.o: In function `m()':
prog.cpp:(.text+0xf): undefined reference to `A<int>::friends_only()'
collect2: ld returned 1 exit status
stdout
Standard output is empty