| 1 |
// { dg-do assemble } |
| 2 |
// GROUPS passed conversions |
| 3 |
// cvt file |
| 4 |
// Message-Id: <[email protected]> |
| 5 |
// From: [email protected] (Brad Daniels) |
| 6 |
// Subject: g++ 2.4.5: Conversion operators to complex types don't work either |
| 7 |
// Date: Thu, 5 Aug 93 15:30:04 CDT |
| 8 |
|
| 9 |
class bar { int x; public: bar() : x(1){} }; |
| 10 |
|
| 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 |
const bar f() { return *this; } |
| 17 |
void g(foo &c) { b = c; } |
| 18 |
}; |