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_TYPEINFO
17 # define _STLP_TYPEINFO
19 # ifndef _STLP_OUTERMOST_HEADER_ID
20 # define _STLP_OUTERMOST_HEADER_ID 0x473
21 # include <stl/_prolog.h>
24 # ifndef _STLP_NO_TYPEINFO
26 # if defined (_STLP_NO_NEW_NEW_HEADER)
27 # include <typeinfo.h>
29 # include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
32 # if defined(_STLP_MSVC) && (_STLP_MSVC >= 1300)
33 // In .NET, <typeinfo> actually includes <typeinfo.h>
34 # undef _STLP_OLDSTD_typeinfo
37 // if <typeinfo.h> already included, do not import anything
38 # if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_OLDSTD_typeinfo) \
39 && ( defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD) || defined (_STLP_USE_OWN_NAMESPACE) || defined (_STLP_DEBUG))
40 # if defined(_STLP_MSVC) && (_STLP_MSVC < 1300)
41 class bad_cast : public exception {};
45 // VC++ 6 has only this guy in ::
46 // # if !(defined(_STLP_MSVC)&& (_STLP_MSVC <= 1200))
47 using _STLP_VENDOR_EXCEPT_STD::type_info;
50 # if !(defined(__MRC__) || defined(__SC__) || defined(__DMC__))
51 using _STLP_VENDOR_EXCEPT_STD::bad_typeid;
54 //#if defined( __xlC__ ) && (__xlC__ < 0x500)
55 //# include <exception>
56 //struct bad_cast : exception {};
58 # if defined(_STLP_MSVC) && (_STLP_MSVC < 1300)
61 using _STLP_VENDOR_EXCEPT_STD::bad_cast;
65 #endif /* _STLP_OWN_NAMESPACE */
72 struct bad_cast : exception {};
75 #endif /* NO_TYPEINFO */
77 # if (_STLP_OUTERMOST_HEADER_ID == 0x473)
78 # include <stl/_epilog.h>
79 # undef _STLP_OUTERMOST_HEADER_ID
82 #endif /* _STLP_TYPEINFO */