Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / g++.old-deja / g++.jason / tempinst1.C
blob966256f372fd51d2e54f33e93695ec23d828d5bf
1 // { dg-do link  }
2 // { dg-options "-g" }
3 // Bug: g++ fails to instantiate operator<<.
5 struct ostream {
6   ostream& operator<< (const char *) { return *this; };
7 };
9 template <class T> class foo;
11 template <class T> ostream& operator<< (ostream& ios, foo<T>&obj) {return ios;}
13 template <class T> class foo {
14   friend ostream& operator<<<>(ostream&, foo<T>&);
17 int main()
19   ostream cout;
20   foo<int> foo_obj;
21   cout << foo_obj; // causes linker error
22   return 0;
23