Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
DYNAMIC_CAST.cpp
Go to the documentation of this file.
1// checking for dynamic_cast
2
3
25#include "config.h"
26#include "nodbg.h"
27
28
29#ifndef _RWSTD_NO_HONOR_STD
30# ifdef _RWSTD_NO_STD_TERMINATE
31# include "terminate.h"
32# endif // _RWSTD_NO_STD_TERMINATE
33#endif // _RWSTD_NO_HONOR_STD
34
35
36struct A
37{
38 virtual ~A () { }
39};
40
41struct B: A { };
42struct C: A { };
43
44
45int main ()
46{
47 nodbg ();
48
49 B b;
50
51 A *a = &b;
52
53 return !(dynamic_cast<B*>(a) && !dynamic_cast<C*>(a));
54}
#define a
Definition 17.names.cpp:109
#define b
Definition 17.names.cpp:110
int main()
void nodbg()
Definition nodbg.h:52
virtual ~A()