OSDN Git Service

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