Angus Leeming <[EMAIL PROTECTED]> writes:

| Anyway, to answer your call for testers, this is what happens here:

I just tested with 

gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

this does not have member templates, but dynamic_cast work as
expected.

To me this implies that all gcc versions is in the clear. No we need
to hear from the non-gcc compilers...

---------------
#include <iostream>

using namespace std;

class Inset {
public:
  virtual ~Inset() {}
};

class AInset : public Inset {};

class BInset : public Inset {};

int main()
{
  Inset * i = new BInset;
  AInset * a1 = dynamic_cast<AInset*>(i);
  BInset * b1 = dynamic_cast<BInset*>(i);
  cout << a1 << endl << b1 << endl;
}


./upcast
(nil)
0x8049d78


-- 
        Lgb

Reply via email to