5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
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.
16 #ifndef _STLP_INTERNAL_TYPEINFO
17 #define _STLP_INTERNAL_TYPEINFO
19 #if !defined (_STLP_NO_TYPEINFO)
21 # if defined (_STLP_NO_NEW_NEW_HEADER)
22 # include <typeinfo.h>
24 # ifdef _STLP_BROKEN_BAD_CAST_CLASS
25 # define bad_cast _STLP_NULLIFIED_BROKEN_BAD_CAST_CLASS
27 # include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
28 # ifdef _STLP_BROKEN_BAD_CAST_CLASS
30 # undef _STLP_NULLIFIED_BROKEN_BAD_CAST_CLASS
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
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 {};
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)
52 using _STLP_VENDOR_EXCEPT_STD::type_info;
55 # if !(defined (__MRC__) || defined (__SC__) || defined (__DMC__))
56 using _STLP_VENDOR_EXCEPT_STD::bad_typeid;
59 //#if defined( __xlC__ ) && (__xlC__ < 0x500)
60 //# include <exception>
61 //struct bad_cast : exception {};
63 # if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined (_STLP_WCE_NET)
66 using _STLP_VENDOR_EXCEPT_STD::bad_cast;
75 # ifndef _STLP_INTERNAL_EXCEPTION
76 # include <stl/_exception.h>
80 # if !defined (__DMC__)
81 struct bad_cast : exception {};