8sa1-gcc/gcc/testsuite/g++.old-deja/g++.law/cvt16.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

30 lines
481 B
C

// 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