#include <iostream>
struct ostream {} cout;
template<typename T> struct A{ T t; };
struct B{};
namespace {
template<typename T>
ostream& operator<< (ostream& out, const A<T>&v)
{ return out << v.t; }
ostream& operator<< (ostream& out, const B&)
{ std::cout << "This should not compile"; return out; }
}
int main(){
A<B> a;
cout << a;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IG9zdHJlYW0ge30gY291dDsgCnRlbXBsYXRlPHR5cGVuYW1lIFQ+IHN0cnVjdCBBeyBUIHQ7IH07CnN0cnVjdCBCe307CgpuYW1lc3BhY2Ugewp0ZW1wbGF0ZTx0eXBlbmFtZSBUPgpvc3RyZWFtJiBvcGVyYXRvcjw8IChvc3RyZWFtJiBvdXQsIGNvbnN0IEE8VD4mdikgCiAgeyByZXR1cm4gb3V0IDw8IHYudDsgfQoKb3N0cmVhbSYgb3BlcmF0b3I8PCAob3N0cmVhbSYgb3V0LCBjb25zdCBCJikgCiAgeyBzdGQ6OmNvdXQgPDwgIlRoaXMgc2hvdWxkIG5vdCBjb21waWxlIjsgcmV0dXJuIG91dDsgfQp9CgppbnQgbWFpbigpewogIEE8Qj4gYTsKICBjb3V0IDw8IGE7IAp9