1 // (C) Copyright John Maddock 2001 - 2002.
\r
2 // (C) Copyright Darin Adler 2001.
\r
3 // (C) Copyright Jens Maurer 2001.
\r
4 // Use, modification and distribution are subject to the
\r
5 // Boost Software License, Version 1.0. (See accompanying file
\r
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
8 // See http://www.boost.org for most recent version.
\r
10 // STLPort standard library config:
\r
12 #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
\r
14 # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
\r
15 # error "This is not STLPort!"
\r
20 // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
\r
21 // for versions prior to 4.1(beta)
\r
23 #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
\r
24 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
\r
28 // If STLport thinks that there is no partial specialisation, then there is no
\r
29 // std::iterator traits:
\r
31 #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
\r
32 # define BOOST_NO_STD_ITERATOR_TRAITS
\r
36 // No new style iostreams on GCC without STLport's iostreams enabled:
\r
38 #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
\r
39 # define BOOST_NO_STRINGSTREAM
\r
43 // No new iostreams implies no std::locale, and no std::stringstream:
\r
45 #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
\r
46 # define BOOST_NO_STD_LOCALE
\r
47 # define BOOST_NO_STRINGSTREAM
\r
51 // If the streams are not native, and we have a "using ::x" compiler bug
\r
52 // then the io stream facets are not available in namespace std::
\r
54 #ifdef _STLPORT_VERSION
\r
55 # if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
\r
56 # define BOOST_NO_STD_LOCALE
\r
59 # if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
\r
60 # define BOOST_NO_STD_LOCALE
\r
64 #if defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x500) || (_STLPORT_VERSION >= 0x520))
\r
65 # define BOOST_NO_STD_UNORDERED
\r
68 #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520)
\r
69 # define BOOST_HAS_TR1_UNORDERED_SET
\r
70 # define BOOST_HAS_TR1_UNORDERED_MAP
\r
73 // Without member template support enabled, their are no template
\r
74 // iterate constructors, and no std::allocator:
\r
76 #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
\r
77 # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
\r
78 # define BOOST_NO_STD_ALLOCATOR
\r
81 // however we always have at least a partial allocator:
\r
83 #define BOOST_HAS_PARTIAL_STD_ALLOCATOR
\r
85 #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
\r
86 # define BOOST_NO_STD_ALLOCATOR
\r
89 #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
\r
90 # define BOOST_NO_STD_ALLOCATOR
\r
94 // If STLport thinks there is no wchar_t at all, then we have to disable
\r
95 // the support for the relevant specilazations of std:: templates.
\r
97 #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
\r
98 # ifndef BOOST_NO_STD_WSTRING
\r
99 # define BOOST_NO_STD_WSTRING
\r
101 # ifndef BOOST_NO_STD_WSTREAMBUF
\r
102 # define BOOST_NO_STD_WSTREAMBUF
\r
107 // We always have SGI style hash_set, hash_map, and slist:
\r
109 #ifndef _STLP_NO_EXTENSIONS
\r
110 #define BOOST_HAS_HASH
\r
111 #define BOOST_HAS_SLIST
\r
115 // STLport does a good job of importing names into namespace std::,
\r
116 // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
\r
117 // workaround does not conflict with STLports:
\r
120 // Harold Howe says:
\r
121 // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
\r
122 // BCB6 does cause problems. If we detect C++ Builder, then don't define
\r
123 // BOOST_NO_STDC_NAMESPACE
\r
125 #if !defined(__BORLANDC__) && !defined(__DMC__)
\r
127 // If STLport is using it's own namespace, and the real names are in
\r
128 // the global namespace, then we duplicate STLport's using declarations
\r
129 // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
\r
130 // necessarily import all the names we need into namespace std::
\r
132 # if (defined(__STL_IMPORT_VENDOR_CSTD) \
\r
133 || defined(__STL_USE_OWN_NAMESPACE) \
\r
134 || defined(_STLP_IMPORT_VENDOR_CSTD) \
\r
135 || defined(_STLP_USE_OWN_NAMESPACE)) \
\r
136 && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
\r
137 # define BOOST_NO_STDC_NAMESPACE
\r
138 # define BOOST_NO_EXCEPTION_STD_NAMESPACE
\r
140 #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
\r
141 // STLport doesn't import std::abs correctly:
\r
142 #include <stdlib.h>
\r
143 namespace std { using ::abs; }
\r
144 // and strcmp/strcpy don't get imported either ('cos they are macros)
\r
145 #include <string.h>
\r
152 #ifdef _STLP_VENDOR_CSTD
\r
153 namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
\r
158 // std::use_facet may be non-standard, uses a class instead:
\r
160 #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
\r
161 # define BOOST_NO_STD_USE_FACET
\r
162 # define BOOST_HAS_STLP_USE_FACET
\r
166 // If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
\r
167 // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
\r
168 // into std:: ourselves).
\r
170 #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
\r
171 # define BOOST_NO_CWCHAR
\r
172 # define BOOST_NO_CWCTYPE
\r
176 // If STLport for some reason was configured so that it thinks that wchar_t
\r
177 // is not an intrinsic type, then we have to disable the support for it as
\r
178 // well (we would be missing required specializations otherwise).
\r
180 #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
\r
181 # undef BOOST_NO_INTRINSIC_WCHAR_T
\r
182 # define BOOST_NO_INTRINSIC_WCHAR_T
\r
186 // Borland ships a version of STLport with C++ Builder 6 that lacks
\r
187 // hashtables and the like:
\r
189 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
\r
190 # undef BOOST_HAS_HASH
\r
194 // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
\r
196 #if defined(__GNUC__) && (__GNUC__ < 3)
\r
197 # include <algorithm> // for std::min and std::max
\r
198 # define BOOST_USING_STD_MIN() ((void)0)
\r
199 # define BOOST_USING_STD_MAX() ((void)0)
\r
200 namespace boost { using std::min; using std::max; }
\r
203 // C++0x headers not yet implemented
\r
205 # define BOOST_NO_0X_HDR_ARRAY
\r
206 # define BOOST_NO_0X_HDR_CHRONO
\r
207 # define BOOST_NO_0X_HDR_CODECVT
\r
208 # define BOOST_NO_0X_HDR_CONCEPTS
\r
209 # define BOOST_NO_0X_HDR_CONDITION_VARIABLE
\r
210 # define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
\r
211 # define BOOST_NO_0X_HDR_FORWARD_LIST
\r
212 # define BOOST_NO_0X_HDR_FUTURE
\r
213 # define BOOST_NO_0X_HDR_INITIALIZER_LIST
\r
214 # define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
\r
215 # define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
\r
216 # define BOOST_NO_0X_HDR_MUTEX
\r
217 # define BOOST_NO_0X_HDR_RANDOM
\r
218 # define BOOST_NO_0X_HDR_RATIO
\r
219 # define BOOST_NO_0X_HDR_REGEX
\r
220 # define BOOST_NO_0X_HDR_SYSTEM_ERROR
\r
221 # define BOOST_NO_0X_HDR_THREAD
\r
222 # define BOOST_NO_0X_HDR_TUPLE
\r
223 # define BOOST_NO_0X_HDR_TYPE_TRAITS
\r
224 # define BOOST_NO_STD_UNORDERED // deprecated; see following
\r
225 # define BOOST_NO_0X_HDR_UNORDERED_MAP
\r
226 # define BOOST_NO_0X_HDR_UNORDERED_SET
\r
228 #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
\r