home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stlpt453.zip / STLport-4.5.3 / stlport / typeinfo < prev    next >
Text File  |  2002-01-10  |  2KB  |  85 lines

  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_TYPEINFO
  17. # define _STLP_TYPEINFO
  18.  
  19. # ifndef _STLP_OUTERMOST_HEADER_ID
  20. #  define _STLP_OUTERMOST_HEADER_ID 0x473
  21. #  include <stl/_prolog.h>
  22. # endif
  23.  
  24. # ifndef _STLP_NO_TYPEINFO
  25.  
  26. # if defined (_STLP_NO_NEW_NEW_HEADER)
  27. #  include <typeinfo.h>
  28. # else
  29. #  include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
  30. # endif
  31.  
  32. // if <typeinfo.h> already included, do not import anything
  33. # if defined  (_STLP_USE_NAMESPACES) && ! defined (_STLP_OLDSTD_typeinfo) \
  34. && ( defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD) || defined (_STLP_USE_OWN_NAMESPACE))
  35.  
  36. # if defined(_STLP_MSVC) && (_STLP_MSVC < 1300)
  37. class _STLP_CLASS_DECLSPEC bad_cast : public exception {
  38. public :
  39. bad_cast() : exception("bad_cast") { }
  40. };
  41. #endif
  42.  
  43. _STLP_BEGIN_NAMESPACE
  44.  
  45. // VC++ 6 has only this guy in ::
  46. // # if !(defined(_STLP_MSVC)&& (_STLP_MSVC <= 1200))
  47. using _STLP_VENDOR_EXCEPT_STD::type_info;
  48. // # endif
  49.  
  50. #  if !(defined(__MRC__) || defined(__SC__))
  51. using _STLP_VENDOR_EXCEPT_STD::bad_typeid;
  52. #  endif
  53.  
  54. //#if defined( __xlC__ ) && (__xlC__ < 0x500)
  55. //# include <exception>
  56. //struct bad_cast : exception {};
  57. //#endif
  58. # if defined(_STLP_MSVC) && (_STLP_MSVC < 1300)
  59. using ::bad_cast;
  60. # else
  61. using _STLP_VENDOR_EXCEPT_STD::bad_cast;
  62. # endif
  63.  
  64. _STLP_END_NAMESPACE
  65. #endif /* _STLP_OWN_NAMESPACE */
  66.  
  67. #else
  68.  
  69. # include <exception>
  70. _STLP_BEGIN_NAMESPACE
  71. struct bad_cast : exception {};
  72. _STLP_END_NAMESPACE
  73. #endif  /* NO_TYPEINFO */
  74.  
  75. # if (_STLP_OUTERMOST_HEADER_ID == 0x473)
  76. #  include <stl/_epilog.h>
  77. #  undef _STLP_OUTERMOST_HEADER_ID
  78. # endif
  79.  
  80. #endif /* _STLP_TYPEINFO */
  81.  
  82. // Local Variables:
  83. // mode:C++
  84. // End:
  85.