stlport.hpp

Go to the documentation of this file.
00001 //  (C) Copyright John Maddock 2001 - 2002. 
00002 //  (C) Copyright Darin Adler 2001. 
00003 //  (C) Copyright Jens Maurer 2001. 
00004 //  Use, modification and distribution are subject to the 
00005 //  Boost Software License, Version 1.0. (See accompanying file 
00006 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00007 
00008 //  See http://www.boost.org for most recent version.
00009 
00010 //  STLPort standard library config:
00011 
00012 #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
00013 #  include <utility>
00014 #  if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
00015 #      error "This is not STLPort!"
00016 #  endif
00017 #endif
00018 
00019 //
00020 // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
00021 // for versions prior to 4.1(beta)
00022 //
00023 #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
00024 #  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
00025 #endif
00026 
00027 //
00028 // If STLport thinks that there is no partial specialisation, then there is no
00029 // std::iterator traits:
00030 //
00031 #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
00032 #  define BOOST_NO_STD_ITERATOR_TRAITS
00033 #endif
00034 
00035 //
00036 // No new style iostreams on GCC without STLport's iostreams enabled:
00037 //
00038 #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
00039 #  define BOOST_NO_STRINGSTREAM
00040 #endif
00041 
00042 //
00043 // No new iostreams implies no std::locale, and no std::stringstream:
00044 //
00045 #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
00046 #  define BOOST_NO_STD_LOCALE
00047 #  define BOOST_NO_STRINGSTREAM
00048 #endif
00049 
00050 //
00051 // If the streams are not native, and we have a "using ::x" compiler bug
00052 // then the io stream facets are not available in namespace std::
00053 //
00054 #ifdef _STLPORT_VERSION
00055 #  if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
00056 #     define BOOST_NO_STD_LOCALE
00057 #  endif
00058 #else
00059 #  if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
00060 #     define BOOST_NO_STD_LOCALE
00061 #  endif
00062 #endif
00063 
00064 //
00065 // Without member template support enabled, their are no template
00066 // iterate constructors, and no std::allocator:
00067 //
00068 #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
00069 #  define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
00070 #  define BOOST_NO_STD_ALLOCATOR
00071 #endif
00072 //
00073 // however we always have at least a partial allocator:
00074 //
00075 #define BOOST_HAS_PARTIAL_STD_ALLOCATOR
00076 
00077 #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
00078 #  define BOOST_NO_STD_ALLOCATOR
00079 #endif
00080 
00081 #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
00082 #  define BOOST_NO_STD_ALLOCATOR
00083 #endif
00084 
00085 //
00086 // If STLport thinks there is no wchar_t at all, then we have to disable
00087 // the support for the relevant specilazations of std:: templates.
00088 //
00089 #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
00090 #  ifndef  BOOST_NO_STD_WSTRING
00091 #     define BOOST_NO_STD_WSTRING
00092 #  endif
00093 #  ifndef  BOOST_NO_STD_WSTREAMBUF
00094 #     define BOOST_NO_STD_WSTREAMBUF
00095 #  endif
00096 #endif
00097 
00098 //
00099 // We always have SGI style hash_set, hash_map, and slist:
00100 //
00101 #define BOOST_HAS_HASH
00102 #define BOOST_HAS_SLIST
00103 
00104 //
00105 // STLport does a good job of importing names into namespace std::,
00106 // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
00107 // workaround does not conflict with STLports:
00108 //
00109 //
00110 // Harold Howe says:
00111 // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
00112 // BCB6 does cause problems. If we detect C++ Builder, then don't define 
00113 // BOOST_NO_STDC_NAMESPACE
00114 //
00115 #if !defined(__BORLANDC__) && !defined(__DMC__)
00116 //
00117 // If STLport is using it's own namespace, and the real names are in
00118 // the global namespace, then we duplicate STLport's using declarations
00119 // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
00120 // necessarily import all the names we need into namespace std::
00121 // 
00122 #  if (defined(__STL_IMPORT_VENDOR_CSTD) \
00123          || defined(__STL_USE_OWN_NAMESPACE) \
00124          || defined(_STLP_IMPORT_VENDOR_CSTD) \
00125          || defined(_STLP_USE_OWN_NAMESPACE)) \
00126       && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
00127 #     define BOOST_NO_STDC_NAMESPACE
00128 #     define BOOST_NO_EXCEPTION_STD_NAMESPACE
00129 #  endif
00130 #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
00131 // STLport doesn't import std::abs correctly:
00132 #include <stdlib.h>
00133 namespace std { using ::abs; }
00134 // and strcmp/strcpy don't get imported either ('cos they are macros)
00135 #include <string.h>
00136 #ifdef strcpy
00137 #  undef strcpy
00138 #endif
00139 #ifdef strcmp
00140 #  undef strcmp
00141 #endif
00142 #ifdef _STLP_VENDOR_CSTD
00143 namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
00144 #endif
00145 #endif
00146 
00147 //
00148 // std::use_facet may be non-standard, uses a class instead:
00149 //
00150 #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
00151 #  define BOOST_NO_STD_USE_FACET
00152 #  define BOOST_HAS_STLP_USE_FACET
00153 #endif
00154 
00155 //
00156 // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
00157 // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import 
00158 // into std:: ourselves).
00159 //
00160 #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
00161 #  define BOOST_NO_CWCHAR
00162 #  define BOOST_NO_CWCTYPE
00163 #endif
00164 
00165 //
00166 // If STLport for some reason was configured so that it thinks that wchar_t
00167 // is not an intrinsic type, then we have to disable the support for it as
00168 // well (we would be missing required specializations otherwise).
00169 //
00170 #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
00171 #  undef  BOOST_NO_INTRINSIC_WCHAR_T
00172 #  define BOOST_NO_INTRINSIC_WCHAR_T
00173 #endif
00174 
00175 //
00176 // Borland ships a version of STLport with C++ Builder 6 that lacks
00177 // hashtables and the like:
00178 //
00179 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
00180 #  undef BOOST_HAS_HASH
00181 #endif
00182 
00183 //
00184 // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
00185 //
00186 #if defined(__GNUC__) && (__GNUC__ < 3)
00187 #  include <algorithm> // for std::min and std::max
00188 #  define BOOST_USING_STD_MIN() ((void)0)
00189 #  define BOOST_USING_STD_MAX() ((void)0)
00190 namespace boost { using std::min; using std::max; }
00191 #endif
00192 
00193 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 

Generated on Wed Jan 21 15:32:09 2009 for SystemC by  doxygen 1.5.5