template <typename T>
class A;
template<typename T>
bool operator==(const A<T>& a, const A<T>& b);
template <typename T>
class A {
int x;
friend bool operator==<T>(const A<T>& a, const A<T>& b);
};
template <typename T>
bool operator== (const A<T>& a, const A<T>& b) {
return a.x == b.x;
}
int main() {
A<int> x, y;
x == y;
return 0;
}
dGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmNsYXNzIEE7Cgp0ZW1wbGF0ZTx0eXBlbmFtZSBUPgpib29sIG9wZXJhdG9yPT0oY29uc3QgQTxUPiYgYSwgY29uc3QgQTxUPiYgYik7Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KY2xhc3MgQSB7CiAgICBpbnQgeDsKICAgIGZyaWVuZCBib29sIG9wZXJhdG9yPT08VD4oY29uc3QgQTxUPiYgYSwgY29uc3QgQTxUPiYgYik7Cn07CgoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmJvb2wgb3BlcmF0b3I9PSAoY29uc3QgQTxUPiYgYSwgY29uc3QgQTxUPiYgYikgewoJcmV0dXJuIGEueCA9PSBiLng7Cn0KCmludCBtYWluKCkgewoJQTxpbnQ+IHgsIHk7Cgl4ID09IHk7CglyZXR1cm4gMDsKfQ==