blob: c6930a2af0920c01ae012d2a26cf2d809b40e090 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// { dg-do assemble }
// PRMS Id: 4257
// Bug: g++ ignores non-member possibilities (ideal_candidate_ansi bug)
class ostream
{
public:
#ifdef EITHER_ONE_A
ostream& operator<<(unsigned long n);
ostream& operator<<(long n);
#else
ostream& operator<<(short n);
ostream& operator<<(unsigned short n);
#endif
};
class ccObjectInfo {};
ostream& operator << (ostream& out, const ccObjectInfo& obj);
class ccString : public ccObjectInfo
{
#ifdef EITHER_ONE_B
operator int () const;
#else
operator long () const;
#endif
};
// Should pick this one!!
ostream& operator << (ostream& o, const ccString & s);
extern ostream cout;
void f ()
{
ccString foo;
cout << foo;
}
|