Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
GLOBAL_TYPE_INFO.cpp
Go to the documentation of this file.
1
// checking for class ::type_info
2
3
25
#if defined (__EDG__) || defined (__sgi) && !defined (__GNUG__)
26
// let edg (or its derivative) know about this fake type_info
27
# pragma define_type_info
28
#endif
// __EDG__
29
30
31
class
type_info
{ };
32
33
34
struct
B
{
virtual
~B
() { } };
35
struct
D
:
B
{ };
36
struct
E
:
B
{ };
37
38
39
int
main
(
int
argc,
char
*argv[])
40
{
41
const
type_info
* ti1 = 0;
42
const
type_info
* ti2 = 0;
43
44
if
(argc > 3) {
45
ti1 = &
typeid
(
D
);
46
ti2 = &
typeid
(
E
);
47
}
48
else
if
(argc > 2) {
49
ti1 = &
typeid
(
D
);
50
ti2 = &
typeid
(
D
);
51
}
52
53
if
(argc > 1)
54
return
ti1 == ti2;
55
56
// link only test
57
return
0;
58
}
E
#define E
Definition
17.names.cpp:148
D
#define D
Definition
17.names.cpp:147
main
#define main
Definition
BAD_ALLOC_COPY_CTOR.cpp:32
type_info
Definition
GLOBAL_TYPE_INFO.cpp:31
B
Definition
NAMESPACE.cpp:31
B::~B
virtual ~B()
Definition
GLOBAL_TYPE_INFO.cpp:34
D
Definition
DEFAULT_TEMPLATE_ARGS.cpp:35
E
Definition
GLOBAL_TYPE_INFO.cpp:36
Generated by
1.9.8