// Contribued by Gabriel Dos Reis // Origin: iskey@i100.ryd.student.liu.se class ostream; extern ostream& cout; template struct s; template ostream& operator<<(ostream &o, const typename s::t &x) // { dg-message "note" } { return o; } template struct s { struct t { friend ostream& operator<<(ostream&, const typename s::t &); }; t x; }; int main() { s::t y; cout << y; // { dg-error "" } // { dg-message "candidate" "candidate note" { target *-*-* } 28 } }