2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / overload9.C
blobc6930a2af0920c01ae012d2a26cf2d809b40e090
1 // { dg-do assemble  }
2 // PRMS Id: 4257
3 // Bug: g++ ignores non-member possibilities (ideal_candidate_ansi bug)
5 class ostream 
7 public:
8 #ifdef EITHER_ONE_A
9     ostream& operator<<(unsigned long n);
10     ostream& operator<<(long n);
11 #else
12     ostream& operator<<(short n);
13     ostream& operator<<(unsigned short n);
14 #endif
17 class ccObjectInfo {};
19 ostream& operator << (ostream& out, const ccObjectInfo& obj);
21 class ccString : public ccObjectInfo
23 #ifdef EITHER_ONE_B
24     operator int                () const;
25 #else
26     operator long               () const;
27 #endif
30 // Should pick this one!!
31 ostream& operator << (ostream& o, const ccString & s);
33 extern ostream cout;
35 void f ()
37     ccString foo;
38     cout << foo;