]> git.buserror.net Git - polintos/scott/priv.git/blob - include/c++/stl/stl/_typeinfo.h
Add STLport 5.1.4
[polintos/scott/priv.git] / include / c++ / stl / stl / _typeinfo.h
1 /*
2  * Copyright (c) 1999
3  * Boris Fomitchev
4  *
5  * This material is provided "as is", with absolutely no warranty expressed
6  * or implied. Any use is at your own risk.
7  *
8  * Permission to use or copy this software for any purpose is hereby granted
9  * without fee, provided the above notices are retained on all copies.
10  * Permission to modify the code and to distribute modified code is granted,
11  * provided the above notices are retained, and a notice that the code was
12  * modified is included with the above copyright notice.
13  *
14  */
15
16 #ifndef _STLP_INTERNAL_TYPEINFO
17 #define _STLP_INTERNAL_TYPEINFO
18
19 #if !defined (_STLP_NO_TYPEINFO)
20
21 #  if defined (_STLP_NO_NEW_NEW_HEADER)
22 #    include <typeinfo.h>
23 #  else
24 #    ifdef _STLP_BROKEN_BAD_CAST_CLASS
25 #      define bad_cast _STLP_NULLIFIED_BROKEN_BAD_CAST_CLASS
26 #    endif
27 #    include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
28 #    ifdef _STLP_BROKEN_BAD_CAST_CLASS
29 #      undef bad_cast
30 #      undef _STLP_NULLIFIED_BROKEN_BAD_CAST_CLASS
31 #    endif
32 #  endif
33
34 #  if (defined(_STLP_MSVC) && (_STLP_MSVC >= 1300)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800))
35 // In .NET, <typeinfo> actually includes <typeinfo.h>
36 #    undef _STLP_OLDSTD_typeinfo
37 #  endif
38
39 // if <typeinfo.h> already included, do not import anything
40 #  if defined(_STLP_USE_NAMESPACES) && !defined(_STLP_OLDSTD_typeinfo) && \
41       (defined(_STLP_VENDOR_GLOBAL_EXCEPT_STD) || \
42        defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_DEBUG))
43 #    if defined(_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined(_STLP_WCE_NET)
44 class bad_cast : public exception {};
45 #    endif
46
47 _STLP_BEGIN_NAMESPACE
48 // VC 6 and eVC 4 have type_info in the global namespace
49 #    if (defined(_STLP_MSVC) && (_STLP_MSVC < 1300)) || defined(_STLP_WCE_NET)
50 using ::type_info;
51 #    else
52 using _STLP_VENDOR_EXCEPT_STD::type_info;
53 #    endif
54
55 #    if !(defined (__MRC__) || defined (__SC__) || defined (__DMC__))
56 using _STLP_VENDOR_EXCEPT_STD::bad_typeid;
57 #    endif
58
59 //#if defined( __xlC__ ) && (__xlC__ < 0x500)
60 //# include <exception>
61 //struct bad_cast : exception {};
62 //#endif
63 #    if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined (_STLP_WCE_NET)
64 using ::bad_cast;
65 #    else
66 using _STLP_VENDOR_EXCEPT_STD::bad_cast;
67 #    endif
68
69 _STLP_END_NAMESPACE
70
71 #  endif
72
73 #else
74
75 #  ifndef _STLP_INTERNAL_EXCEPTION
76 #    include <stl/_exception.h>
77 #  endif
78
79 _STLP_BEGIN_NAMESPACE
80 #  if !defined (__DMC__)
81 struct bad_cast : exception {};
82 #  endif
83 _STLP_END_NAMESPACE
84 #endif
85
86 #endif