blob: c539c96e536164c3cf864cd48411584827e1ac73 (
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
|
// Build don't link:
// GROUPS passed conversions
// cvt file
// Message-Id: <9304121647.AA25819@tnt>
// From: mclaugh@tnt.acsys.com (Mark A. McLaughlin)
// Subject: g++ bug
// Date: Mon, 12 Apr 93 10:47:01 MDT
#include <iostream.h>
class B {
};
class A : public B {
short s;
public:
A(short _s = 0) { s = _s; }
operator const short &() const { return s; }
};
int
main() {
A a(37);
//cout << a << endl;
cout << (short)a << endl;
return 0;
} // main
|