aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/template24.C
blob: 120b717eddd7d78f3310ce0b1155de250de1027f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Bug: g++ doesn't find the conversion from ostream_withassign to ostream.

#include <iostream.h>

template <class T>
struct A {
  T t;
};

template <class T>
ostream & operator<< (ostream & os, A<T> & a)
{
  os << a.t;
  return os;
}

int main ()
{
  A<int> a = { 1 };
  cout << a << endl;
}