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# if defined (_STLP_HAS_INCLUDE_NEXT) 25# include_next <typeinfo> 26# else 27# include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo) 28# endif 29# endif 30 31# if (defined(_STLP_MSVC) && (_STLP_MSVC >= 1300)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) 32// In .NET, <typeinfo> actually includes <typeinfo.h> 33# undef _STLP_OLDSTD_typeinfo 34# endif 35 36// if <typeinfo.h> already included, do not import anything 37# if defined(_STLP_USE_NAMESPACES) && !defined(_STLP_OLDSTD_typeinfo) && \ 38 (defined(_STLP_VENDOR_GLOBAL_EXCEPT_STD) || \ 39 defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_DEBUG)) 40# if defined(_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined(_STLP_WCE_NET) 41class bad_cast : public exception {}; 42# endif 43 44_STLP_BEGIN_NAMESPACE 45// VC 6 and eVC 4 have type_info in the global namespace 46# if (defined(_STLP_MSVC) && (_STLP_MSVC < 1300)) || defined(_STLP_WCE_NET) 47using ::type_info; 48# else 49using _STLP_VENDOR_EXCEPT_STD::type_info; 50# endif 51 52# if !defined (__DMC__) 53using _STLP_VENDOR_EXCEPT_STD::bad_typeid; 54# endif 55 56# if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined (_STLP_WCE_NET) 57using ::bad_cast; 58# else 59using _STLP_VENDOR_EXCEPT_STD::bad_cast; 60# endif 61 62_STLP_END_NAMESPACE 63 64# endif 65 66#else 67 68# ifndef _STLP_INTERNAL_EXCEPTION 69# include <stl/_exception.h> 70# endif 71 72_STLP_BEGIN_NAMESPACE 73# if !defined (__DMC__) 74struct bad_cast : exception {}; 75# endif 76_STLP_END_NAMESPACE 77#endif 78 79#endif 80