1 /* 2 * 3 * Copyright 2009, The Android Open Source Project 4 * Copyright (c) 1994 5 * Hewlett-Packard Company 6 * 7 * Permission to use, copy, modify, distribute and sell this software 8 * and its documentation for any purpose is hereby granted without fee, 9 * provided that the above copyright notice appear in all copies and 10 * that both that copyright notice and this permission notice appear 11 * in supporting documentation. Hewlett-Packard Company makes no 12 * representations about the suitability of this software for any 13 * purpose. It is provided "as is" without express or implied warranty. 14 * 15 * Copyright (c) 1997 16 * Silicon Graphics 17 * 18 * Permission to use, copy, modify, distribute and sell this software 19 * and its documentation for any purpose is hereby granted without fee, 20 * provided that the above copyright notice appear in all copies and 21 * that both that copyright notice and this permission notice appear 22 * in supporting documentation. Silicon Graphics makes no 23 * representations about the suitability of this software for any 24 * purpose. It is provided "as is" without express or implied warranty. 25 * 26 */ 27 28 #ifndef __STL_CONFIG_H 29 # define __STL_CONFIG_H 30 31 // Flags: 32 // * __STL_NO_BOOL: defined if the compiler doesn't have bool as a builtin 33 // type. 34 // * __STL_HAS_WCHAR_T: defined if the compier has wchar_t as a builtin type. 35 // * __STL_NO_DRAND48: defined if the compiler doesn't have the drand48 36 // function. 37 // * __STL_STATIC_TEMPLATE_MEMBER_BUG: defined if the compiler can't handle 38 // static members of template classes. 39 // * __STL_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a 40 // constant-initializer in the declaration of a static const data member 41 // of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) 42 // * __STL_CLASS_PARTIAL_SPECIALIZATION: defined if the compiler supports 43 // partial specialization of template classes. 44 // * __STL_PARTIAL_SPECIALIZATION_SYNTAX: defined if the compiler 45 // supports partial specialization syntax for full specialization of 46 // class templates. (Even if it doesn't actually support partial 47 // specialization itself.) 48 // * __STL_FUNCTION_TMPL_PARTIAL_ORDER: defined if the compiler supports 49 // partial ordering of function templates. (a.k.a partial specialization 50 // of function templates.) 51 // * __STL_MEMBER_TEMPLATES: defined if the compiler supports template 52 // member functions of classes. 53 // * __STL_MEMBER_TEMPLATE_CLASSES: defined if the compiler supports 54 // nested classes that are member templates of other classes. 55 // * __STL_TEMPLATE_FRIENDS: defined if the compiler supports templatized 56 // friend declarations. 57 // * __STL_EXPLICIT_FUNCTION_TMPL_ARGS: defined if the compiler 58 // supports calling a function template by providing its template 59 // arguments explicitly. 60 // * __STL_LIMITED_DEFAULT_TEMPLATES: defined if the compiler is unable 61 // to handle default template parameters that depend on previous template 62 // parameters. 63 // * __STL_NON_TYPE_TMPL_PARAM_BUG: defined if the compiler has trouble with 64 // function template argument deduction for non-type template parameters. 65 // * __SGI_STL_NO_ARROW_OPERATOR: defined if the compiler is unable 66 // to support the -> operator for iterators. 67 // * __STL_DEFAULT_CONSTRUCTOR_BUG: defined if T() does not work properly 68 // when T is a builtin type. 69 // * __STL_USE_EXCEPTIONS: defined if the compiler (in the current compilation 70 // mode) supports exceptions. 71 // * __STL_USE_NAMESPACES: defined if the compiler has the necessary 72 // support for namespaces. 73 // * __STL_NO_EXCEPTION_HEADER: defined if the compiler does not have a 74 // standard-conforming header <exception>. 75 // * __STL_NO_BAD_ALLOC: defined if the compiler does not have a <new> 76 // header, or if <new> does not contain a bad_alloc class. If a bad_alloc 77 // class exists, it is assumed to be in namespace std. 78 // * __STL_SGI_THREADS: defined if this is being compiled for an SGI IRIX 79 // system in multithreaded mode, using native SGI threads instead of 80 // pthreads. 81 // * __STL_WIN32THREADS: defined if this is being compiled on a WIN32 82 // compiler in multithreaded mode. 83 // * __STL_PTHREADS: defined if we should use portable pthreads 84 // synchronization. 85 // * __STL_UITHREADS: defined if we should use UI / solaris / UnixWare threads 86 // synchronization. UIthreads are similar to pthreads, but are based 87 // on an earlier version of the Posix threads standard. 88 // * __STL_LONG_LONG if the compiler has long long and unsigned long long 89 // types. (They're not in the C++ standard, but they are expected to be 90 // included in the forthcoming C9X standard.) 91 // * __STL_THREADS is defined if thread safety is needed. 92 // * __STL_VOLATILE is defined to be "volatile" if threads are being 93 // used, and the empty string otherwise. 94 // * __STL_USE_CONCEPT_CHECKS enables some extra compile-time error 95 // checking to make sure that user-defined template arguments satisfy 96 // all of the appropriate requirements. This may result in more 97 // comprehensible error messages. It incurs no runtime overhead. This 98 // feature requires member templates and partial specialization. 99 // * __STL_NO_USING_CLAUSE_IN_CLASS: The compiler does not handle "using" 100 // clauses inside of class definitions. 101 // * __STL_NO_FRIEND_TEMPLATE_CLASS: The compiler does not handle friend 102 // declaractions where the friend is a template class. 103 // * __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE: The compiler does not 104 // support the use of a function pointer type as the argument 105 // for a template. 106 // * __STL_MEMBER_TEMPLATE_KEYWORD: standard C++ requires the template 107 // keyword in a few new places (14.2.4). This flag is set for 108 // compilers that support (and require) this usage. 109 110 111 // User-settable macros that control compilation: 112 // * __STL_USE_SGI_ALLOCATORS: if defined, then the STL will use older 113 // SGI-style allocators, instead of standard-conforming allocators, 114 // even if the compiler supports all of the language features needed 115 // for standard-conforming allocators. 116 // * __STL_NO_NAMESPACES: if defined, don't put the library in namespace 117 // std, even if the compiler supports namespaces. 118 // * __STL_NO_RELOPS_NAMESPACE: if defined, don't put the relational 119 // operator templates (>, <=. >=, !=) in namespace std::rel_ops, even 120 // if the compiler supports namespaces and partial ordering of 121 // function templates. 122 // * __STL_ASSERTIONS: if defined, then enable runtime checking through the 123 // __stl_assert macro. 124 // * _PTHREADS: if defined, use Posix threads for multithreading support. 125 // * _UITHREADS:if defined, use SCO/Solaris/UI threads for multithreading 126 // support 127 // * _NOTHREADS: if defined, don't use any multithreading support. 128 // * _STL_NO_CONCEPT_CHECKS: if defined, disables the error checking that 129 // we get from __STL_USE_CONCEPT_CHECKS. 130 // * __STL_USE_NEW_IOSTREAMS: if defined, then the STL will use new, 131 // standard-conforming iostreams (e.g. the <iosfwd> header). If not 132 // defined, the STL will use old cfront-style iostreams (e.g. the 133 // <iostream.h> header). 134 135 // Other macros defined by this file: 136 137 // * bool, true, and false, if __STL_NO_BOOL is defined. 138 // * typename, as a null macro if it's not already a keyword. 139 // * explicit, as a null macro if it's not already a keyword. 140 // * namespace-related macros (__STD, __STL_BEGIN_NAMESPACE, etc.) 141 // * exception-related macros (__STL_TRY, __STL_UNWIND, etc.) 142 // * __stl_assert, either as a test or as a null macro, depending on 143 // whether or not __STL_ASSERTIONS is defined. 144 145 # if defined(_PTHREADS) && !defined(_NOTHREADS) 146 # define __STL_PTHREADS 147 # endif 148 149 # if defined(_UITHREADS) && !defined(_PTHREADS) && !defined(_NOTHREADS) 150 # define __STL_UITHREADS 151 # endif 152 153 # if defined(__sgi) && !defined(__GNUC__) 154 # include <standards.h> 155 # if !defined(_BOOL) 156 # define __STL_NO_BOOL 157 # endif 158 # if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32 159 # define __STL_STATIC_CONST_INIT_BUG 160 # endif 161 # if defined(_WCHAR_T_IS_KEYWORD) 162 # define __STL_HAS_WCHAR_T 163 # endif 164 # if !defined(_TYPENAME_IS_KEYWORD) 165 # define __STL_NEED_TYPENAME 166 # endif 167 # ifdef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES 168 # define __STL_CLASS_PARTIAL_SPECIALIZATION 169 # endif 170 # if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32 171 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER 172 # endif 173 # ifdef _MEMBER_TEMPLATES 174 # define __STL_MEMBER_TEMPLATES 175 # define __STL_TEMPLATE_FRIENDS 176 # define __STL_MEMBER_TEMPLATE_CLASSES 177 # endif 178 # if defined(_MEMBER_TEMPLATE_KEYWORD) 179 # define __STL_MEMBER_TEMPLATE_KEYWORD 180 # endif 181 # if defined(_STANDARD_C_PLUS_PLUS) 182 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS 183 # endif 184 # if (_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32 185 # define __STL_MEMBER_TEMPLATE_KEYWORD 186 # endif 187 # if COMPILER_VERSION < 720 || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) 188 # define __STL_DEFAULT_CONSTRUCTOR_BUG 189 # endif 190 # if !defined(_EXPLICIT_IS_KEYWORD) 191 # define __STL_NEED_EXPLICIT 192 # endif 193 # ifdef __EXCEPTIONS 194 # define __STL_USE_EXCEPTIONS 195 # endif 196 # if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES) 197 # define __STL_HAS_NAMESPACES 198 # endif 199 # if (_COMPILER_VERSION < 721) || \ 200 !defined(__STL_HAS_NAMESPACES) || defined(__STL_NO_NAMESPACES) 201 # define __STL_NO_EXCEPTION_HEADER 202 # endif 203 # if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || \ 204 !defined(_NAMESPACES) 205 # define __STL_NO_BAD_ALLOC 206 # endif 207 # if !defined(_NOTHREADS) && !defined(__STL_PTHREADS) 208 # define __STL_SGI_THREADS 209 # endif 210 # if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI 211 # define __STL_LONG_LONG 212 # endif 213 # if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) 214 # define __STL_USE_NEW_IOSTREAMS 215 # endif 216 # if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) 217 # define __STL_CAN_THROW_RANGE_ERRORS 218 # endif 219 # if _COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS) 220 # define __SGI_STL_USE_AUTO_PTR_CONVERSIONS 221 # endif 222 # endif 223 224 225 /* 226 * Jochen Schlick '1999 - added new #defines (__STL)_UITHREADS (for 227 * providing SCO / Solaris / UI thread support) 228 * - added the necessary defines for the SCO UDK 7 229 * compiler (and its template friend behavior) 230 * - all UDK7 specific STL changes are based on the 231 * macro __USLC__ being defined 232 */ 233 // SCO UDK 7 compiler (UnixWare 7x, OSR 5, UnixWare 2x) 234 # if defined(__USLC__) 235 # define __STL_HAS_WCHAR_T 236 # define __STL_CLASS_PARTIAL_SPECIALIZATION 237 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX 238 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER 239 # define __STL_MEMBER_TEMPLATES 240 # define __STL_MEMBER_TEMPLATE_CLASSES 241 # define __STL_USE_EXCEPTIONS 242 # define __STL_HAS_NAMESPACES 243 # define __STL_USE_NAMESPACES 244 # define __STL_LONG_LONG 245 # if defined(_REENTRANT) 246 # define _UITHREADS /* if UnixWare < 7.0.1 */ 247 # define __STL_UITHREADS 248 // use the following defines instead of the UI threads defines when 249 // you want to use POSIX threads 250 //# define _PTHREADS /* only if UnixWare >=7.0.1 */ 251 //# define __STL_PTHREADS 252 # endif 253 # endif 254 255 256 257 # ifdef __GNUC__ 258 # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 259 # define __STL_STATIC_TEMPLATE_MEMBER_BUG 260 # endif 261 # if __GNUC__ < 2 262 # define __STL_NEED_TYPENAME 263 # define __STL_NEED_EXPLICIT 264 # endif 265 # if __GNUC__ == 2 && __GNUC_MINOR__ <= 8 266 # define __STL_NO_EXCEPTION_HEADER 267 # define __STL_NO_BAD_ALLOC 268 # endif 269 # if __GNUC__ == 2 && __GNUC_MINOR__ >= 8 || __GNUC__ > 2 270 # define __STL_CLASS_PARTIAL_SPECIALIZATION 271 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER 272 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS 273 # define __STL_MEMBER_TEMPLATES 274 # define __STL_CAN_THROW_RANGE_ERRORS 275 // g++ 2.8.1 supports member template functions, but not member 276 // template nested classes. 277 # if __GNUC_MINOR__ >= 9 || __GNUC__ > 2 278 # define __STL_MEMBER_TEMPLATE_CLASSES 279 # define __STL_TEMPLATE_FRIENDS 280 # define __SGI_STL_USE_AUTO_PTR_CONVERSIONS 281 # define __STL_HAS_NAMESPACES 282 //# define __STL_USE_NEW_IOSTREAMS 283 # endif 284 # endif 285 # define __STL_DEFAULT_CONSTRUCTOR_BUG 286 # ifdef __EXCEPTIONS 287 # define __STL_USE_EXCEPTIONS 288 # endif 289 # ifdef _REENTRANT 290 # define __STL_PTHREADS 291 # endif 292 # if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95) 293 # define __STL_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE 294 # endif 295 # endif 296 297 # if defined(__SUNPRO_CC) 298 # define __STL_NO_BOOL 299 # define __STL_NEED_TYPENAME 300 # define __STL_NEED_EXPLICIT 301 # define __STL_USE_EXCEPTIONS 302 # ifdef _REENTRANT 303 # define __STL_PTHREADS 304 # endif 305 # define __SGI_STL_NO_ARROW_OPERATOR 306 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX 307 # define __STL_NO_EXCEPTION_HEADER 308 # define __STL_NO_BAD_ALLOC 309 # endif 310 311 # if defined(__COMO__) 312 # define __STL_MEMBER_TEMPLATES 313 # define __STL_MEMBER_TEMPLATE_CLASSES 314 # define __STL_TEMPLATE_FRIENDS 315 # define __STL_CLASS_PARTIAL_SPECIALIZATION 316 # define __STL_USE_EXCEPTIONS 317 # define __STL_HAS_NAMESPACES 318 # endif 319 320 // Intel compiler, which uses the EDG front end. 321 # if defined(__ICL) 322 # define __STL_LONG_LONG 323 # define __STL_MEMBER_TEMPLATES 324 # define __STL_MEMBER_TEMPLATE_CLASSES 325 # define __STL_TEMPLATE_FRIENDS 326 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER 327 # define __STL_CLASS_PARTIAL_SPECIALIZATION 328 # define __STL_NO_DRAND48 329 # define __STL_HAS_NAMESPACES 330 # define __STL_USE_EXCEPTIONS 331 # define __STL_MEMBER_TEMPLATE_KEYWORD 332 # ifdef _CPPUNWIND 333 # define __STL_USE_EXCEPTIONS 334 # endif 335 # ifdef _MT 336 # define __STL_WIN32THREADS 337 # endif 338 # endif 339 340 // Mingw32, egcs compiler using the Microsoft C runtime 341 # if defined(__MINGW32__) 342 # define __STL_NO_DRAND48 343 # ifdef _MT 344 # define __STL_WIN32THREADS 345 # endif 346 # endif 347 348 // Cygwin32, egcs compiler on MS Windows 349 # if defined(__CYGWIN__) 350 # define __STL_NO_DRAND48 351 # endif 352 353 354 355 // Microsoft compiler. 356 # if defined(_MSC_VER) && !defined(__ICL) && !defined(__MWERKS__) 357 # define __STL_NO_DRAND48 358 # define __STL_STATIC_CONST_INIT_BUG 359 # define __STL_NEED_TYPENAME 360 # define __STL_NO_USING_CLAUSE_IN_CLASS 361 # define __STL_NO_FRIEND_TEMPLATE_CLASS 362 # if _MSC_VER < 1100 /* 1000 is version 4.0, 1100 is 5.0, 1200 is 6.0. */ 363 # define __STL_NEED_EXPLICIT 364 # define __STL_NO_BOOL 365 # define __STL_NO_BAD_ALLOC 366 # endif 367 # if _MSC_VER > 1000 368 # include <yvals.h> 369 # define __STL_DONT_USE_BOOL_TYPEDEF 370 # endif 371 # define __STL_NON_TYPE_TMPL_PARAM_BUG 372 # define __SGI_STL_NO_ARROW_OPERATOR 373 # define __STL_DEFAULT_CONSTRUCTOR_BUG 374 # ifdef _CPPUNWIND 375 # define __STL_USE_EXCEPTIONS 376 # endif 377 # ifdef _MT 378 # define __STL_WIN32THREADS 379 # endif 380 # if _MSC_VER >= 1200 381 # define __STL_PARTIAL_SPECIALIZATION_SYNTAX 382 # define __STL_HAS_NAMESPACES 383 # define __STL_CAN_THROW_RANGE_ERRORS 384 # define NOMINMAX 385 # undef min 386 # undef max 387 // disable warning 'initializers put in unrecognized initialization area' 388 # pragma warning ( disable : 4075 ) 389 // disable warning 'empty controlled statement found' 390 # pragma warning ( disable : 4390 ) 391 // disable warning 'debug symbol greater than 255 chars' 392 # pragma warning ( disable : 4786 ) 393 # endif 394 # if _MSC_VER < 1100 395 # define __STL_NO_EXCEPTION_HEADER 396 # define __STL_NO_BAD_ALLOC 397 # endif 398 // Because of a Microsoft front end bug, we must not provide a 399 // namespace qualifier when declaring a friend function. 400 # define __STD_QUALIFIER 401 # endif 402 403 # if defined(__BORLANDC__) 404 # define __STL_NO_BAD_ALLOC 405 # define __STL_NO_DRAND48 406 # define __STL_DEFAULT_CONSTRUCTOR_BUG 407 # if __BORLANDC__ >= 0x540 /* C++ Builder 4.0 */ 408 # define __STL_CLASS_PARTIAL_SPECIALIZATION 409 # define __STL_FUNCTION_TMPL_PARTIAL_ORDER 410 # define __STL_EXPLICIT_FUNCTION_TMPL_ARGS 411 # define __STL_MEMBER_TEMPLATES 412 # define __STL_TEMPLATE_FRIENDS 413 # else 414 # define __STL_NEED_TYPENAME 415 # define __STL_LIMITED_DEFAULT_TEMPLATES 416 # define __SGI_STL_NO_ARROW_OPERATOR 417 # define __STL_NON_TYPE_TMPL_PARAM_BUG 418 # endif 419 # ifdef _CPPUNWIND 420 # define __STL_USE_EXCEPTIONS 421 # endif 422 # ifdef __MT__ 423 # define __STL_WIN32THREADS 424 # endif 425 # endif 426 427 # if defined(__STL_NO_BOOL) && !defined(__STL_DONT_USE_BOOL_TYPEDEF) 428 typedef int bool; 429 # define true 1 430 # define false 0 431 # endif 432 433 # ifdef __STL_NEED_TYPENAME 434 # define typename 435 # endif 436 437 # ifdef __STL_LIMITED_DEFAULT_TEMPLATES 438 # define __STL_DEPENDENT_DEFAULT_TMPL(_Tp) 439 # else 440 # define __STL_DEPENDENT_DEFAULT_TMPL(_Tp) = _Tp 441 # endif 442 443 # ifdef __STL_MEMBER_TEMPLATE_KEYWORD 444 # define __STL_TEMPLATE template 445 # else 446 # define __STL_TEMPLATE 447 # endif 448 449 # ifdef __STL_NEED_EXPLICIT 450 # define explicit 451 # endif 452 453 # ifdef __STL_EXPLICIT_FUNCTION_TMPL_ARGS 454 # define __STL_NULL_TMPL_ARGS <> 455 # else 456 # define __STL_NULL_TMPL_ARGS 457 # endif 458 459 # if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \ 460 || defined (__STL_PARTIAL_SPECIALIZATION_SYNTAX) 461 # define __STL_TEMPLATE_NULL template<> 462 # else 463 # define __STL_TEMPLATE_NULL 464 # endif 465 466 // Use standard-conforming allocators if we have the necessary language 467 // features. __STL_USE_SGI_ALLOCATORS is a hook so that users can 468 // disable new-style allocators, and continue to use the same kind of 469 // allocators as before, without having to edit library headers. 470 # if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && \ 471 defined(__STL_MEMBER_TEMPLATES) && \ 472 defined(__STL_MEMBER_TEMPLATE_CLASSES) && \ 473 !defined(__STL_NO_BOOL) && \ 474 !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \ 475 !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \ 476 !defined(__STL_USE_SGI_ALLOCATORS) 477 # define __STL_USE_STD_ALLOCATORS 478 # endif 479 480 # ifndef __STL_DEFAULT_ALLOCATOR 481 # ifdef __STL_USE_STD_ALLOCATORS 482 # define __STL_DEFAULT_ALLOCATOR(T) allocator< T > 483 # else 484 # define __STL_DEFAULT_ALLOCATOR(T) alloc 485 # endif 486 # endif 487 488 // __STL_NO_NAMESPACES is a hook so that users can disable namespaces 489 // without having to edit library headers. __STL_NO_RELOPS_NAMESPACE is 490 // a hook so that users can disable the std::rel_ops namespace, keeping 491 // the relational operator template in namespace std, without having to 492 // edit library headers. 493 # if defined(__STL_HAS_NAMESPACES) && !defined(__STL_NO_NAMESPACES) 494 # define __STL_USE_NAMESPACES 495 # define __STD std 496 # define __STL_BEGIN_NAMESPACE namespace std { 497 # define __STL_END_NAMESPACE } 498 # if defined(__STL_FUNCTION_TMPL_PARTIAL_ORDER) && \ 499 !defined(__STL_NO_RELOPS_NAMESPACE) 500 # define __STL_USE_NAMESPACE_FOR_RELOPS 501 # define __STL_BEGIN_RELOPS_NAMESPACE namespace std { namespace rel_ops { 502 # define __STL_END_RELOPS_NAMESPACE } } 503 # define __STD_RELOPS std::rel_ops 504 # else /* Use std::rel_ops namespace */ 505 # define __STL_USE_NAMESPACE_FOR_RELOPS 506 # define __STL_BEGIN_RELOPS_NAMESPACE namespace std { 507 # define __STL_END_RELOPS_NAMESPACE } 508 # define __STD_RELOPS std 509 # endif /* Use std::rel_ops namespace */ 510 # else 511 # define __STD 512 # define __STL_BEGIN_NAMESPACE 513 # define __STL_END_NAMESPACE 514 # undef __STL_USE_NAMESPACE_FOR_RELOPS 515 # define __STL_BEGIN_RELOPS_NAMESPACE 516 # define __STL_END_RELOPS_NAMESPACE 517 # define __STD_RELOPS 518 # undef __STL_USE_NAMESPACES 519 # endif 520 521 // Some versions of the EDG front end sometimes require an explicit 522 // namespace spec where they shouldn't. This macro facilitates that. 523 // If the bug becomes irrelevant, then all uses of __STD_QUALIFIER 524 // should be removed. The 7.3 beta SGI compiler has this bug, but the 525 // MR version is not expected to have it. 526 527 # if defined(__STL_USE_NAMESPACES) && !defined(__STD_QUALIFIER) 528 # define __STD_QUALIFIER std:: 529 # else 530 # define __STD_QUALIFIER 531 # endif 532 533 # ifdef __STL_USE_EXCEPTIONS 534 # define __STL_TRY try 535 # define __STL_CATCH_ALL catch(...) 536 # define __STL_THROW(x) throw x 537 # define __STL_RETHROW throw 538 # define __STL_NOTHROW throw() 539 # define __STL_UNWIND(action) catch(...) { action; throw; } 540 # else 541 # define __STL_TRY 542 # define __STL_CATCH_ALL if (false) 543 # define __STL_THROW(x) 544 # define __STL_RETHROW 545 # define __STL_NOTHROW 546 # define __STL_UNWIND(action) 547 # endif 548 549 #ifdef __STL_ASSERTIONS 550 # include <stdio.h> 551 # define __stl_assert(expr) \ 552 if (!(expr)) { fprintf(stderr, "%s:%d STL assertion failure: %s\n", \ 553 __FILE__, __LINE__, # expr); abort(); } 554 #else 555 # define __stl_assert(expr) 556 #endif 557 558 #if defined(__STL_WIN32THREADS) || defined(__STL_SGI_THREADS) \ 559 || defined(__STL_PTHREADS) || defined(__STL_UITHREADS) 560 # define __STL_THREADS 561 # define __STL_VOLATILE volatile 562 #else 563 # define __STL_VOLATILE 564 #endif 565 566 #if defined(__STL_CLASS_PARTIAL_SPECIALIZATION) \ 567 && defined(__STL_MEMBER_TEMPLATES) \ 568 && !defined(_STL_NO_CONCEPT_CHECKS) 569 # define __STL_USE_CONCEPT_CHECKS 570 #endif 571 572 573 #endif /* __STL_CONFIG_H */ 574 575 // Local Variables: 576 // mode:C++ 577 // End: 578