// Bug: g++ fails to instantiate operator<<. // Build don't run: // Special g++ Options: -g struct ostream { ostream& operator<< (const char *) { return *this; }; }; template class foo; template ostream& operator<< (ostream& ios, foo&obj) { }; template class foo { friend ostream& operator<<<>(ostream&, foo&); }; int main() { ostream cout; foo foo_obj; cout << foo_obj; // causes linker error return 0; }