// Contribued by Gabriel Dos Reis // Origin: iskey@i100.ryd.student.liu.se // { dg-do link } #include using namespace std; template struct s; template ostream& operator<<(ostream &o, const typename s::t &x) { return o; } template struct s { struct t { friend ostream& operator<<(ostream&, const typename s::t &); }; t x; }; int main() { s::t y; cout << y; }