OSDN Git Service

120b717eddd7d78f3310ce0b1155de250de1027f
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / template24.C
1 // Bug: g++ doesn't find the conversion from ostream_withassign to ostream.
2
3 #include <iostream.h>
4
5 template <class T>
6 struct A {
7   T t;
8 };
9
10 template <class T>
11 ostream & operator<< (ostream & os, A<T> & a)
12 {
13   os << a.t;
14   return os;
15 }
16
17 int main ()
18 {
19   A<int> a = { 1 };
20   cout << a << endl;
21 }