1// From: panisset@cae.ca (Jean-Francois Panisset)
2// Date: Mon, 6 Jun 94 13:39:25 EDT
3// Subject: Problem with operator overloading
4
5// Build don't link:
6
7class ostream {
8public:
9  ostream& operator<<(double n);
10  ostream& operator<<(float n);
11};
12
13class X
14{
15public:
16  operator long() const;
17  operator double() const;
18};
19ostream& operator<< (ostream& os, const X& x);
20
21
22int main()
23{
24  X x;
25  ostream os;
26  os << x; // gets bogus error - converting to float
27}
28