home *** CD-ROM | disk | FTP | other *** search
- #if 0
- From: Mike Finley
- Subject: Problem with new compiler (2.18)
- Date: Fri 4/01/91, 9:45 am
- Status: Fixed in 3.0
- #endif
-
- class fred
- {
- public:
- fred(int a);
- ~fred();
- };
- class jim : public fred
- {
- public:
- jim(): fred(0) {}
- ~jim();
- };
- class test
- {
- public:
- test( int a, fred *b) {}
- test( float a, fred *b) {}
- ~test();
- };
- main()
- {
- test *pTok, *pTfail;
- jim *pJ;
-
- pJ =new jim;
-
- pTok= new test(0, (fred*)pJ);
- // Next line gives ambiguous reference to function
- pTfail=new test(0, pJ);
-
- // But page 324 of ARM says 0 is an int so an exact match. For the second
- // argument both require the same standard conversion.
-
- return 0;
- }
-
- /*
- (pTfail demonstrates the problem, which is failing to recognise a
- descendant class as valid)
-
- mike
- */
-
-