[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-devel
Subject: Re: C++ question
From: larsbj () lyx ! org (Lars Gullik =?iso-8859-1?q?Bj=F8nnes?=)
Date: 2002-10-31 11:27:05
[Download RAW message or body]
Angus Leeming <a.leeming@ic.ac.uk> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic