FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / overload9.C
blob5b832fbc5f1437f69cabce922805fc52cb46e465
1 // PRMS Id: 4257
2 // Bug: g++ ignores non-member possibilities (ideal_candidate_ansi bug)
3 // Build don't link:
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;