summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename24.C
blob: a376f2459876405f371138be079c34108ff0909b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do assemble  }
// Origin: Mark Mitchell <mark@codesourcery.com>

class ostream;

extern ostream& cout;

class Foo { };

ostream &operator<<(ostream &os, const Foo &)
{
  return os;
}

template<class T>
const typename T::fooz &operator<<(const Foo &, const T &t)
{
  return t;
}

int main()
{
  Foo foo;

  cout << foo;
}