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 <cstddef>
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 #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION < 0x500)
00065 #  define BOOST_NO_STD_UNORDERED
00066 #endif
00067 //
00068 // Without member template support enabled, their are no template
00069 // iterate constructors, and no std::allocator:
00070 //
00071 #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
00072 #  define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
00073 #  define BOOST_NO_STD_ALLOCATOR
00074 #endif
00075 //
00076 // however we always have at least a partial allocator:
00077 //
00078 #define BOOST_HAS_PARTIAL_STD_ALLOCATOR
00079 
00080 #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
00081 #  define BOOST_NO_STD_ALLOCATOR
00082 #endif
00083 
00084 #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
00085 #  define BOOST_NO_STD_ALLOCATOR
00086 #endif
00087 
00088 //
00089 // If STLport thinks there is no wchar_t at all, then we have to disable
00090 // the support for the relevant specilazations of std:: templates.
00091 //
00092 #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
00093 #  ifndef  BOOST_NO_STD_WSTRING
00094 #     define BOOST_NO_STD_WSTRING
00095 #  endif
00096 #  ifndef  BOOST_NO_STD_WSTREAMBUF
00097 #     define BOOST_NO_STD_WSTREAMBUF
00098 #  endif
00099 #endif
00100 
00101 //
00102 // We always have SGI style hash_set, hash_map, and slist:
00103 //
00104 #ifndef _STLP_NO_EXTENSIONS
00105 #define BOOST_HAS_HASH
00106 #define BOOST_HAS_SLIST
00107 #endif
00108 
00109 //
00110 // STLport does a good job of importing names into namespace std::,
00111 // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
00112 // workaround does not conflict with STLports:
00113 //
00114 //
00115 // Harold Howe says:
00116 // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
00117 // BCB6 does cause problems. If we detect C++ Builder, then don't define 
00118 // BOOST_NO_STDC_NAMESPACE
00119 //
00120 #if !defined(__BORLANDC__) && !defined(__DMC__)
00121 //
00122 // If STLport is using it's own namespace, and the real names are in
00123 // the global namespace, then we duplicate STLport's using declarations
00124 // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
00125 // necessarily import all the names we need into namespace std::
00126 // 
00127 #  if (defined(__STL_IMPORT_VENDOR_CSTD) \
00128          || defined(__STL_USE_OWN_NAMESPACE) \
00129          || defined(_STLP_IMPORT_VENDOR_CSTD) \
00130          || defined(_STLP_USE_OWN_NAMESPACE)) \
00131       && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
00132 #     define BOOST_NO_STDC_NAMESPACE
00133 #     define BOOST_NO_EXCEPTION_STD_NAMESPACE
00134 #  endif
00135 #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
00136 // STLport doesn't import std::abs correctly:
00137 #include <stdlib.h>
00138 namespace std { using ::abs; }
00139 // and strcmp/strcpy don't get imported either ('cos they are macros)
00140 #include <string.h>
00141 #ifdef strcpy
00142 #  undef strcpy
00143 #endif
00144 #ifdef strcmp
00145 #  undef strcmp
00146 #endif
00147 #ifdef _STLP_VENDOR_CSTD
00148 namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
00149 #endif
00150 #endif
00151 
00152 //
00153 // std::use_facet may be non-standard, uses a class instead:
00154 //
00155 #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
00156 #  define BOOST_NO_STD_USE_FACET
00157 #  define BOOST_HAS_STLP_USE_FACET
00158 #endif
00159 
00160 //
00161 // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
00162 // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import 
00163 // into std:: ourselves).
00164 //
00165 #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
00166 #  define BOOST_NO_CWCHAR
00167 #  define BOOST_NO_CWCTYPE
00168 #endif
00169 
00170 //
00171 // If STLport for some reason was configured so that it thinks that wchar_t
00172 // is not an intrinsic type, then we have to disable the support for it as
00173 // well (we would be missing required specializations otherwise).
00174 //
00175 #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
00176 #  undef  BOOST_NO_INTRINSIC_WCHAR_T
00177 #  define BOOST_NO_INTRINSIC_WCHAR_T
00178 #endif
00179 
00180 //
00181 // Borland ships a version of STLport with C++ Builder 6 that lacks
00182 // hashtables and the like:
00183 //
00184 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
00185 #  undef BOOST_HAS_HASH
00186 #endif
00187 
00188 //
00189 // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
00190 //
00191 #if defined(__GNUC__) && (__GNUC__ < 3)
00192 #  include <algorithm> // for std::min and std::max
00193 #  define BOOST_USING_STD_MIN() ((void)0)
00194 #  define BOOST_USING_STD_MAX() ((void)0)
00195 namespace boost { using std::min; using std::max; }
00196 #endif
00197 
00198 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
00199 
00200 
00201 
00202 
00203 
00204 
00205 
00206 


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29