gcc/testsuite/g++.old-deja/g++.law/cvt19.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed conversions |
| 3 | // cvt file |
| 4 | // Message-Id: <[email protected]> |
| 5 | // From: [email protected] |
| 6 | // Date: Tue, 13 Jul 93 17:00:44 BST |
| 7 | |
| 8 | |
| 9 | class B {}; |
| 10 | |
| 11 | class A { |
| 12 | public: |
| 13 | operator const B*() const { |
| 14 | return b; |
| 15 | } |
| 16 | private: |
| 17 | B* b; |
| 18 | }; |
| 19 | |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | A a; |
| 24 | if (a!=0) { |
| 25 | } |
| 26 | } |
| 27 |