FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / cvt23.C
blob626d01c5932cc0bf17c352a2b8ef4afe2c345c3d
1 // Build don't link: 
2 // GROUPS passed conversions
3 // cvt file
4 // Message-Id: <9308051209.AA15962@NeoSoft.Com>
5 // From: daniels@sugar.neosoft.com (Brad Daniels)
6 // Subject: Bug in g++ 2.4.5: Conversion operators to enumerated types don't wor
7 // Date: Thu, 5 Aug 93 12:09:09 CDT
9 enum bar { AAA, BBB };
11 class foo {
12    bar a, b;
13 public:
14    foo(bar i, bar j) : a(i),b(j) {}
15    operator const bar() const { return a; }
16    bar f() { return *this; }
17    void g(foo &c) { b = c; }