language: C++11 (gcc-4.7.2)
date: 183 days 15 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
template <class T> class A;
template <class T, class U>
void operator*(A<T>, A<U>);
 
template <class T>
class A {
    friend void ::operator*<>(A<T>, A<T>);
    void friends_only();
};
 
template <class T, class U>
void operator*(A<T> a, A<U>) {
  a.friends_only();
}
 
int m()
{
    A<int> a;
    A<void> b;
    a*a;
}
/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