00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __STL_CONFIG_H
00028 # define __STL_CONFIG_H
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 # if defined(_PTHREADS) && !defined(_NOTHREADS)
00145 # define __STL_PTHREADS
00146 # endif
00147
00148 # if defined(_UITHREADS) && !defined(_PTHREADS) && !defined(_NOTHREADS)
00149 # define __STL_UITHREADS
00150 # endif
00151
00152 # if defined(__sgi) && !defined(__GNUC__)
00153 # include <standards.h>
00154 # if !defined(_BOOL)
00155 # define __STL_NO_BOOL
00156 # endif
00157 # if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32
00158 # define __STL_STATIC_CONST_INIT_BUG
00159 # endif
00160 # if defined(_WCHAR_T_IS_KEYWORD)
00161 # define __STL_HAS_WCHAR_T
00162 # endif
00163 # if !defined(_TYPENAME_IS_KEYWORD)
00164 # define __STL_NEED_TYPENAME
00165 # endif
00166 # ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
00167 # define __STL_CLASS_PARTIAL_SPECIALIZATION
00168 # endif
00169 # if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
00170 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
00171 # endif
00172 # ifdef _MEMBER_TEMPLATES
00173 # define __STL_MEMBER_TEMPLATES
00174 # define __STL_TEMPLATE_FRIENDS
00175 # define __STL_MEMBER_TEMPLATE_CLASSES
00176 # endif
00177 # if defined(_MEMBER_TEMPLATE_KEYWORD)
00178 # define __STL_MEMBER_TEMPLATE_KEYWORD
00179 # endif
00180 # if defined(_STANDARD_C_PLUS_PLUS)
00181 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
00182 # endif
00183 # if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32
00184 # define __STL_MEMBER_TEMPLATE_KEYWORD
00185 # endif
00186 # if COMPILER_VERSION < 720 || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32)
00187 # define __STL_DEFAULT_CONSTRUCTOR_BUG
00188 # endif
00189 # if !defined(_EXPLICIT_IS_KEYWORD)
00190 # define __STL_NEED_EXPLICIT
00191 # endif
00192 # ifdef __EXCEPTIONS
00193 # define __STL_USE_EXCEPTIONS
00194 # endif
00195 # if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES)
00196 # define __STL_HAS_NAMESPACES
00197 # endif
00198 # if (_COMPILER_VERSION < 721) || \
00199 !defined(__STL_HAS_NAMESPACES) || defined(__STL_NO_NAMESPACES)
00200 # define __STL_NO_EXCEPTION_HEADER
00201 # endif
00202 # if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || \
00203 !defined(_NAMESPACES)
00204 # define __STL_NO_BAD_ALLOC
00205 # endif
00206 # if !defined(_NOTHREADS) && !defined(__STL_PTHREADS)
00207 # define __STL_SGI_THREADS
00208 # endif
00209 # if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI
00210 # define __STL_LONG_LONG
00211 # endif
00212 # if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
00213 # define __STL_USE_NEW_IOSTREAMS
00214 # endif
00215 # if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
00216 # define __STL_CAN_THROW_RANGE_ERRORS
00217 # endif
00218 # if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS)
00219 # define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
00220 # endif
00221 # endif
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233 # if defined(__USLC__)
00234 # define __STL_HAS_WCHAR_T
00235 # define __STL_CLASS_PARTIAL_SPECIALIZATION
00236 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX
00237 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
00238 # define __STL_MEMBER_TEMPLATES
00239 # define __STL_MEMBER_TEMPLATE_CLASSES
00240 # define __STL_USE_EXCEPTIONS
00241 # define __STL_HAS_NAMESPACES
00242 # define __STL_USE_NAMESPACES
00243 # define __STL_LONG_LONG
00244 # if defined(_REENTRANT)
00245 # define _UITHREADS
00246 # define __STL_UITHREADS
00247
00248
00249
00250
00251 # endif
00252 # endif
00253
00254
00255
00256 # ifdef __GNUC__
00257 # define __STL_HAS_WCHAR_T
00258 # define __STL_MEMBER_TEMPLATES
00259 # define __STL_MEMBER_TEMPLATE_CLASSES
00260 # define __STL_TEMPLATE_FRIENDS
00261 # define __STL_CLASS_PARTIAL_SPECIALIZATION
00262 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX
00263 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
00264 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
00265 # define __SGI_STL_USE_AUTO_PTR_CONVERSIONS
00266 # define __STL_HAS_NAMESPACES
00267 # define __STL_USE_NAMESPACES
00268 # ifdef __EXCEPTIONS
00269 # define __STL_USE_EXCEPTIONS
00270 # endif
00271 # define __STL_THROW_RANGE_ERRORS
00272 # define __STL_CAN_THROW_RANGE_ERRORS
00273 # define __STL_USE_STD_ALLOCATORS
00274 # define __USE_MALLOC // As the "underlying allocator"
00275
00276 # ifdef _REENTRANT
00277 # define __STL_THREADS
00278 # endif
00279 # ifdef _PTHREADS
00280 # define __STL_PTHREADS
00281 # endif
00282 # ifndef __STRICT_ANSI__
00283 # define __STL_LONG_LONG
00284 # endif
00285 # if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
00286 # define __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
00287 # endif
00288 # endif
00289
00290 # if defined(__SUNPRO_CC)
00291 # define __STL_NO_BOOL
00292 # define __STL_NEED_TYPENAME
00293 # define __STL_NEED_EXPLICIT
00294 # define __STL_USE_EXCEPTIONS
00295 # ifdef _REENTRANT
00296 # define __STL_PTHREADS
00297 # endif
00298 # define __SGI_STL_NO_ARROW_OPERATOR
00299 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX
00300 # define __STL_NO_EXCEPTION_HEADER
00301 # define __STL_NO_BAD_ALLOC
00302 # endif
00303
00304 # if defined(__COMO__)
00305 # define __STL_MEMBER_TEMPLATES
00306 # define __STL_MEMBER_TEMPLATE_CLASSES
00307 # define __STL_TEMPLATE_FRIENDS
00308 # define __STL_CLASS_PARTIAL_SPECIALIZATION
00309 # define __STL_USE_EXCEPTIONS
00310 # define __STL_HAS_NAMESPACES
00311 # endif
00312
00313
00314 # if defined(__ICL)
00315 # define __STL_LONG_LONG
00316 # define __STL_MEMBER_TEMPLATES
00317 # define __STL_MEMBER_TEMPLATE_CLASSES
00318 # define __STL_TEMPLATE_FRIENDS
00319 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
00320 # define __STL_CLASS_PARTIAL_SPECIALIZATION
00321 # define __STL_NO_DRAND48
00322 # define __STL_HAS_NAMESPACES
00323 # define __STL_USE_EXCEPTIONS
00324 # define __STL_MEMBER_TEMPLATE_KEYWORD
00325 # ifdef _CPPUNWIND
00326 # define __STL_USE_EXCEPTIONS
00327 # endif
00328 # ifdef _MT
00329 # define __STL_WIN32THREADS
00330 # endif
00331 # endif
00332
00333
00334 # if defined(__MINGW32__)
00335 # define __STL_NO_DRAND48
00336 # ifdef _MT
00337 # define __STL_WIN32THREADS
00338 # endif
00339 # endif
00340
00341
00342 # if defined(__CYGWIN__)
00343 # define __STL_NO_DRAND48
00344 # endif
00345
00346
00347
00348
00349 # if defined(_MSC_VER) && !defined(__ICL) && !defined(__MWERKS__)
00350 # define __STL_NO_DRAND48
00351 # define __STL_STATIC_CONST_INIT_BUG
00352 # define __STL_NEED_TYPENAME
00353 # define __STL_NO_USING_CLAUSE_IN_CLASS
00354 # define __STL_NO_FRIEND_TEMPLATE_CLASS
00355 # if _MSC_VER < 1100
00356 # define __STL_NEED_EXPLICIT
00357 # define __STL_NO_BOOL
00358 # define __STL_NO_BAD_ALLOC
00359 # endif
00360 # if _MSC_VER > 1000
00361 # include <yvals.h>
00362 # define __STL_DONT_USE_BOOL_TYPEDEF
00363 # endif
00364 # define __STL_NON_TYPE_TMPL_PARAM_BUG
00365 # define __SGI_STL_NO_ARROW_OPERATOR
00366 # define __STL_DEFAULT_CONSTRUCTOR_BUG
00367 # ifdef _CPPUNWIND
00368 # define __STL_USE_EXCEPTIONS
00369 # endif
00370 # ifdef _MT
00371 # define __STL_WIN32THREADS
00372 # endif
00373 # if _MSC_VER >= 1200
00374 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX
00375 # define __STL_HAS_NAMESPACES
00376 # define __STL_CAN_THROW_RANGE_ERRORS
00377 # define NOMINMAX
00378 # undef min
00379 # undef max
00380
00381 # pragma warning ( disable : 4075 )
00382
00383 # pragma warning ( disable : 4390 )
00384
00385 # pragma warning ( disable : 4786 )
00386 # endif
00387 # if _MSC_VER < 1100
00388 # define __STL_NO_EXCEPTION_HEADER
00389 # define __STL_NO_BAD_ALLOC
00390 # endif
00391
00392
00393 # define __STD_QUALIFIER
00394 # endif
00395
00396 # if defined(__BORLANDC__)
00397 # define __STL_NO_BAD_ALLOC
00398 # define __STL_NO_DRAND48
00399 # define __STL_DEFAULT_CONSTRUCTOR_BUG
00400 # if __BORLANDC__ >= 0x540
00401 # define __STL_CLASS_PARTIAL_SPECIALIZATION
00402 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
00403 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
00404 # define __STL_MEMBER_TEMPLATES
00405 # define __STL_TEMPLATE_FRIENDS
00406 # else
00407 # define __STL_NEED_TYPENAME
00408 # define __STL_LIMITED_DEFAULT_TEMPLATES
00409 # define __SGI_STL_NO_ARROW_OPERATOR
00410 # define __STL_NON_TYPE_TMPL_PARAM_BUG
00411 # endif
00412 # ifdef _CPPUNWIND
00413 # define __STL_USE_EXCEPTIONS
00414 # endif
00415 # ifdef __MT__
00416 # define __STL_WIN32THREADS
00417 # endif
00418 # endif
00419
00420 # if defined(__STL_NO_BOOL) && !defined(__STL_DONT_USE_BOOL_TYPEDEF)
00421 typedef int bool;
00422 # define true 1
00423 # define false 0
00424 # endif
00425
00426 # ifdef __STL_NEED_TYPENAME
00427 # define typename
00428 # endif
00429
00430 # ifdef __STL_LIMITED_DEFAULT_TEMPLATES
00431 # define __STL_DEPENDENT_DEFAULT_TMPL(_Tp)
00432 # else
00433 # define __STL_DEPENDENT_DEFAULT_TMPL(_Tp) = _Tp
00434 # endif
00435
00436 # ifdef __STL_MEMBER_TEMPLATE_KEYWORD
00437 # define __STL_TEMPLATE template
00438 # else
00439 # define __STL_TEMPLATE
00440 # endif
00441
00442 # ifdef __STL_NEED_EXPLICIT
00443 # define explicit
00444 # endif
00445
00446 # ifdef __STL_EXPLICIT_FUNCTION_TMPL_ARGS
00447 # define __STL_NULL_TMPL_ARGS <>
00448 # else
00449 # define __STL_NULL_TMPL_ARGS
00450 # endif
00451
00452 # if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \
00453 || defined (__STL_PARTIAL_SPECIALIZATION_SYNTAX)
00454 # define __STL_TEMPLATE_NULL template<>
00455 # else
00456 # define __STL_TEMPLATE_NULL
00457 # endif
00458
00459
00460
00461
00462
00463 # if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && \
00464 defined(__STL_MEMBER_TEMPLATES) && \
00465 defined(__STL_MEMBER_TEMPLATE_CLASSES) && \
00466 !defined(__STL_NO_BOOL) && \
00467 !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \
00468 !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \
00469 !defined(__STL_USE_SGI_ALLOCATORS)
00470 # define __STL_USE_STD_ALLOCATORS
00471 # endif
00472
00473 # ifndef __STL_DEFAULT_ALLOCATOR
00474 # ifdef __STL_USE_STD_ALLOCATORS
00475 # define __STL_DEFAULT_ALLOCATOR(T) allocator< T >
00476 # else
00477 # define __STL_DEFAULT_ALLOCATOR(T) alloc
00478 # endif
00479 # endif
00480
00481
00482
00483
00484
00485
00486 # if defined(__STL_HAS_NAMESPACES) && !defined(__STL_NO_NAMESPACES)
00487 # define __STL_USE_NAMESPACES
00488 # define __STD std
00489 # define __STL_BEGIN_NAMESPACE namespace std {
00490 # define __STL_END_NAMESPACE }
00491 # if defined(__STL_FUNCTION_TMPL_PARTIAL_ORDER) && \
00492 !defined(__STL_NO_RELOPS_NAMESPACE)
00493 # define __STL_USE_NAMESPACE_FOR_RELOPS
00494 # define __STL_BEGIN_RELOPS_NAMESPACE namespace std { namespace rel_ops {
00495 # define __STL_END_RELOPS_NAMESPACE } }
00496 # define __STD_RELOPS std::rel_ops
00497 # else
00498 # define __STL_USE_NAMESPACE_FOR_RELOPS
00499 # define __STL_BEGIN_RELOPS_NAMESPACE namespace std {
00500 # define __STL_END_RELOPS_NAMESPACE }
00501 # define __STD_RELOPS std
00502 # endif
00503 # else
00504 # define __STD
00505 # define __STL_BEGIN_NAMESPACE
00506 # define __STL_END_NAMESPACE
00507 # undef __STL_USE_NAMESPACE_FOR_RELOPS
00508 # define __STL_BEGIN_RELOPS_NAMESPACE
00509 # define __STL_END_RELOPS_NAMESPACE
00510 # define __STD_RELOPS
00511 # undef __STL_USE_NAMESPACES
00512 # endif
00513
00514
00515
00516
00517
00518
00519
00520 # if defined(__STL_USE_NAMESPACES) && !defined(__STD_QUALIFIER)
00521 # define __STD_QUALIFIER std::
00522 # else
00523 # define __STD_QUALIFIER
00524 # endif
00525
00526 # ifdef __STL_USE_EXCEPTIONS
00527 # define __STL_TRY try
00528 # define __STL_CATCH_ALL catch(...)
00529 # define __STL_THROW(x) throw x
00530 # define __STL_RETHROW throw
00531 # define __STL_NOTHROW throw()
00532 # define __STL_UNWIND(action) catch(...) { action; throw; }
00533 # else
00534 # define __STL_TRY
00535 # define __STL_CATCH_ALL if (false)
00536 # define __STL_THROW(x)
00537 # define __STL_RETHROW
00538 # define __STL_NOTHROW
00539 # define __STL_UNWIND(action)
00540 # endif
00541
00542 #ifdef __STL_ASSERTIONS
00543 # include <stdio.h>
00544 # define __stl_assert(expr) \
00545 if (!(expr)) { fprintf(stderr, "%s:%d STL assertion failure: %s\n", \
00546 __FILE__, __LINE__, # expr); abort(); }
00547 #else
00548 # define __stl_assert(expr)
00549 #endif
00550
00551 #if defined(__STL_WIN32THREADS) || defined(__STL_SGI_THREADS) \
00552 || defined(__STL_PTHREADS) || defined(__STL_UITHREADS)
00553 # define __STL_THREADS
00554 # define __STL_VOLATILE volatile
00555 #else
00556 # define __STL_VOLATILE
00557 #endif
00558
00559
00560
00561 #if 0
00562 #if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \
00563 && defined(__STL_MEMBER_TEMPLATES) \
00564 && !defined(_STL_NO_CONCEPT_CHECKS)
00565 # define __STL_USE_CONCEPT_CHECKS
00566 #endif
00567 #endif
00568
00569 #endif
00570
00571
00572
00573