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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
00047 # define STLSOFT_VER_H_STLSOFT_MAJOR 2
00048 # define STLSOFT_VER_H_STLSOFT_MINOR 0
00049 # define STLSOFT_VER_H_STLSOFT_REVISION 1
00050 # define STLSOFT_VER_H_STLSOFT_EDIT 202
00051 #endif
00052
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
00145
00148
00151
00154
00155 #define _STLSOFT_VER_MAJOR 1
00156 #define _STLSOFT_VER_MINOR 8
00157 #define _STLSOFT_VER_REVISION 1
00158 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
00159 # define _STLSOFT_VER_1_0_1 0x00010001
00160 # define _STLSOFT_VER_1_0_2 0x00010002
00161 # define _STLSOFT_VER_1_1_1 0x00010101
00162 # define _STLSOFT_VER_1_1_2 0x00010102
00163 # define _STLSOFT_VER_1_1_3 0x00010103
00164 # define _STLSOFT_VER_1_2_1 0x00010201
00165 # define _STLSOFT_VER_1_3_1 0x00010301
00166 # define _STLSOFT_VER_1_3_2 0x00010302
00167 # define _STLSOFT_VER_1_4_1 0x00010401
00168 # define _STLSOFT_VER_1_4_2 0x00010402
00169 # define _STLSOFT_VER_1_4_3 0x00010403
00170 # define _STLSOFT_VER_1_4_4 0x00010404
00171 # define _STLSOFT_VER_1_4_5 0x00010405
00172 # define _STLSOFT_VER_1_4_6 0x00010406
00173 # define _STLSOFT_VER_1_5_1 0x00010501
00174 # define _STLSOFT_VER_1_5_2 0x00010502
00175 # define _STLSOFT_VER_1_6_1 0x00010601
00176 # define _STLSOFT_VER_1_6_2 0x00010602
00177 # define _STLSOFT_VER_1_6_3 0x00010603
00178 # define _STLSOFT_VER_1_6_4 0x00010604
00179 # define _STLSOFT_VER_1_6_5 0x00010605
00180 # define _STLSOFT_VER_1_6_6 0x00010606
00181 # define _STLSOFT_VER_1_7_1 0x00010701
00182 # define _STLSOFT_VER_1_7_2 0x00010702
00183 # define _STLSOFT_VER_1_8_1 0x00010801
00184 #endif
00185
00186 #define _STLSOFT_VER _STLSOFT_VER_1_8_1
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
00199 # define STLSOFT_STRINGIZE_(x) #x
00200 # define STLSOFT_STRINGIZE(x) STLSOFT_STRINGIZE_(x)
00201 #endif
00202
00203
00204
00205
00206 #define STLSOFT_MACRO_INDIRECT(x) x
00207
00208
00209
00210
00211
00212
00213
00214
00215 #ifndef __cplusplus
00216 # error The STLSoft libraries are only compatible with C++ compilation units
00217 #endif
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238 #ifdef __STLSOFT_COMPILER_IS_UNKNOWN
00239 # undef __STLSOFT_COMPILER_IS_UNKNOWN
00240 #endif
00241
00242 #ifdef __STLSOFT_COMPILER_IS_BORLAND
00243 # undef __STLSOFT_COMPILER_IS_BORLAND
00244 #endif
00245
00246 #ifdef __STLSOFT_COMPILER_IS_COMO
00247 # undef __STLSOFT_COMPILER_IS_COMO
00248 #endif
00249
00250 #ifdef __STLSOFT_COMPILER_IS_DMC
00251 # undef __STLSOFT_COMPILER_IS_DMC
00252 #endif
00253
00254 #ifdef __STLSOFT_COMPILER_IS_GCC
00255 # undef __STLSOFT_COMPILER_IS_GCC
00256 #endif
00257
00258 #ifdef __STLSOFT_COMPILER_IS_INTEL
00259 # undef __STLSOFT_COMPILER_IS_INTEL
00260 #endif
00261
00262 #ifdef __STLSOFT_COMPILER_IS_MSVC
00263 # undef __STLSOFT_COMPILER_IS_MSVC
00264 #endif
00265
00266 #ifdef __STLSOFT_COMPILER_IS_MWERKS
00267 # undef __STLSOFT_COMPILER_IS_MWERKS
00268 #endif
00269
00270 #ifdef __STLSOFT_COMPILER_IS_VECTORC
00271 # undef __STLSOFT_COMPILER_IS_VECTORC
00272 #endif
00273
00274 #ifdef __STLSOFT_COMPILER_IS_WATCOM
00275 # undef __STLSOFT_COMPILER_IS_WATCOM
00276 #endif
00277
00278
00279
00280
00281
00282 #ifdef _MSC_VER
00283 # if defined(__BORLANDC__) || \
00284 defined(__COMO__) || \
00285 defined(__DMC__) || \
00286 defined(__GNUC__) || \
00287 defined(__INTEL_COMPILER) || \
00288 defined(__MWERKS__) || \
00289 defined(__WATCOMC__)
00290
00291 # if defined(_STLSOFT_NO_MSC_VER_SUPPORT) || \
00292 ( defined(_STLSOFT_STRICT) && \
00293 !defined(_STLSOFT_MSC_VER_SUPPORT))
00294 # undef _MSC_VER
00295 # endif
00296 # endif
00297 #endif
00298
00299 #if defined(_STLSOFT_FORCE_CUSTOM_COMPILER)
00300 # define __STLSOFT_COMPILER_LABEL_STRING "Custom (forced) compiler"
00301 # define __STLSOFT_COMPILER_VERSION_STRING "Custom (forced) compiler"
00302 # define __STLSOFT_COMPILER_IS_CUSTOM
00303 # ifndef __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
00304 # error When using the custom compiler option you must define the symbol __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME, e.g. #define __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME <stlsoft_cccap_my_compiler.h>
00305 # endif
00306
00307 #elif defined(__COMO__)
00308
00309 # define __STLSOFT_COMPILER_IS_COMO
00310 # define __STLSOFT_COMPILER_LABEL_STRING "Comeau C++"
00311 # if __COMO_VERSION__ < 4300
00312 # error Only versions 4.3.0.1 and later of Comeau C++ compiler is supported by the STLSoft libraries
00313 # elif (__COMO_VERSION__ == 4300)
00314 # define __STLSOFT_COMPILER_VERSION_STRING "Comeau C++ 4.3.0.1"
00315 # else
00316 # define __STLSOFT_COMPILER_VERSION_STRING "Unknown version of Comeau C++"
00317 # endif
00318
00319 #elif defined(__BORLANDC__)
00320
00321 # define __STLSOFT_COMPILER_IS_BORLAND
00322 # define __STLSOFT_COMPILER_LABEL_STRING "Borland C/C++"
00323 # if 0
00324 # define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 4.52"
00325 # elif 0
00326 # define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.5"
00327 # elif (__BORLANDC__ == 0x0551)
00328 # define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.51"
00329 # elif (__BORLANDC__ == 0x0560)
00330 # define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.6"
00331 # elif (__BORLANDC__ == 0x0564)
00332 # define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.64 (C++ BuilderX)"
00333 # else
00334
00335 # error Currently only versions 5.51, 5.6 and 5.6.4 of the Borland C++ compiler are supported by the STLSoft libraries
00336 # endif
00337
00338 #elif defined(__DMC__)
00339
00340 # define __STLSOFT_COMPILER_IS_DMC
00341 # define __STLSOFT_COMPILER_LABEL_STRING "Digital Mars C/C++"
00342 # if (__DMC__ < 0x0826)
00343 # error Only versions 8.26 and later of the Digital Mars C/C++ compilers are supported by the STLSoft libraries
00344 # else
00345 # if __DMC__ >= 0x0832
00346 # define __STLSOFT_COMPILER_VERSION_STRING __DMC_VERSION_STRING__
00347 # elif (__DMC__ == 0x0826)
00348 # define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.26"
00349 # elif (__DMC__ == 0x0827)
00350 # define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.27"
00351 # elif (__DMC__ == 0x0828)
00352 # define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.28"
00353 # elif (__DMC__ == 0x0829)
00354 # define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.29"
00355 # elif (__DMC__ == 0x0830)
00356 # define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.30"
00357 # elif (__DMC__ == 0x0831)
00358 # define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.31"
00359 # endif
00360 # endif
00361
00362 #elif defined(__INTEL_COMPILER)
00363
00364 # define __STLSOFT_COMPILER_IS_INTEL
00365 # define __STLSOFT_COMPILER_LABEL_STRING "Intel C/C++"
00366 # if (__INTEL_COMPILER == 600)
00367 # define __STLSOFT_COMPILER_VERSION_STRING "Intel C/C++ 6.0"
00368 # elif (__INTEL_COMPILER == 700)
00369 # define __STLSOFT_COMPILER_VERSION_STRING "Intel C/C++ 7.0"
00370 # elif (__INTEL_COMPILER == 800)
00371 # define __STLSOFT_COMPILER_VERSION_STRING "Intel C/C++ 8.0"
00372 # else
00373 # error Only Intel C++ Compiler versions 6.0 and 7.0 currently supported by the STLSoft libraries
00374 # endif
00375
00376 #elif defined(__GNUC__)
00377
00378 # define __STLSOFT_COMPILER_IS_GCC
00379 # define __STLSOFT_COMPILER_LABEL_STRING "GNU C/C++"
00380 # if __GNUC__ != 2 && \
00381 __GNUC__ != 3
00382 # error GNU C/C++ compilers whose major version is not 2 or 3 are not currently supported by the STLSoft libraries
00383 # elif __GNUC__ == 2
00384 # if __GNUC_MINOR__ < 95
00385 # error Currently only version 2.95 and above of the GNU C/C++ compiler is supported by the STLSoft libraries
00386 # elif __GNUC_MINOR__ == 95
00387 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 2.95"
00388 # elif __GNUC_MINOR__ == 96
00389 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 2.96"
00390 # else
00391 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ >2.96 - you should be aware that this version may not be supported correctly"
00392 # endif
00393 # elif __GNUC__ == 3
00394 # if __GNUC_MINOR__ == 2
00395 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 3.2"
00396 # elif __GNUC_MINOR__ == 3
00397 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 3.3"
00398 # elif __GNUC_MINOR__ == 4
00399 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 3.4"
00400 # else
00401 # define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ >3.4 - you should be aware that this version may not be supported correctly"
00402 # endif
00403 # endif
00404
00405 #elif defined(__MWERKS__)
00406
00407 # define __STLSOFT_COMPILER_IS_MWERKS
00408 # define __STLSOFT_COMPILER_LABEL_STRING "Metrowerks CodeWarrior C/C++"
00409 # if ((__MWERKS__ & 0xFF00) == 0x2400)
00410 # define __STLSOFT_COMPILER_VERSION_STRING "Metrowerks CodeWarrior C++ 2.4"
00411 # elif ((__MWERKS__ & 0xFF00) == 0x3000)
00412 # define __STLSOFT_COMPILER_VERSION_STRING "Metrowerks CodeWarrior C++ 3.0"
00413 # elif ((__MWERKS__ & 0xFF00) == 0x3200)
00414 # define __STLSOFT_COMPILER_VERSION_STRING "Metrowerks CodeWarrior C++ 3.2"
00415 # else
00416 # error Only Metrowerks C++ Compiler 2.4 (CodeWarrior 7), 3.0 (CodeWarrior 8) and 3.2 (CodeWarrior 9) currently supported by the STLSoft libraries
00417 # endif
00418
00419 #elif defined(__VECTORC)
00420
00421 # define __STLSOFT_COMPILER_IS_VECTORC
00422 # define __STLSOFT_COMPILER_LABEL_STRING "CodePlay VectorC C/C++"
00423 # if (__VECTORC == 1)
00424 # define __STLSOFT_COMPILER_VERSION_STRING "CodePlay VectorC C/C++"
00425 # else
00426 # error Currently only versions of the CodePlay Vector C/C++ compiler defining __VECTORC == 1 are supported by the STLSoft libraries
00427 # endif
00428
00429 #elif defined(__WATCOMC__)
00430
00431 # define __STLSOFT_COMPILER_IS_WATCOM
00432 # define __STLSOFT_COMPILER_LABEL_STRING "Watcom C/C++"
00433
00434 # if (__WATCOMC__ == 1100)
00435 # define __STLSOFT_COMPILER_VERSION_STRING "Watcom C/C++ 11.0"
00436 # elif (__WATCOMC__ == 1200)
00437 # define __STLSOFT_COMPILER_VERSION_STRING "Open Watcom C/C++ 1.0 (Watcom 12.0)"
00438 # elif (__WATCOMC__ == 1210)
00439 # define __STLSOFT_COMPILER_VERSION_STRING "Open Watcom C/C++ 1.1 (Watcom 12.1)"
00440 # elif (__WATCOMC__ == 1220)
00441 # define __STLSOFT_COMPILER_VERSION_STRING "Open Watcom C/C++ 1.2 (Watcom 12.2)"
00442 # else
00443 # error Currently only versions 11.0 and 12.0 of the Watcom C/C++ compiler is supported by the STLSoft libraries
00444 # endif
00445
00446 #elif defined(_MSC_VER)
00447
00448 # define __STLSOFT_COMPILER_IS_MSVC
00449 # define __STLSOFT_COMPILER_LABEL_STRING "Visual C++"
00450 # if 0
00451 # define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ 4.2"
00452 # elif (_MSC_VER == 1100)
00453 # define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ 5.0"
00454 # elif (_MSC_VER == 1200)
00455 # define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ 6.0"
00456 # elif (_MSC_VER == 1300)
00457 # define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ .NET (7.0)"
00458 # elif (_MSC_VER == 1310)
00459 # define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ .NET (7.1)"
00460 # elif (_MSC_VER == 1400)
00461 # define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ .NET (8.0)"
00462 # else
00463 # error Currently only versions 5.0, 6.0, 7.0, 7.1 & 8.0 of the Visual C++ compiler are supported by the STLSoft libraries
00464 # endif
00465
00466 #else
00467
00468 # if defined(_STLSOFT_FORCE_UNKNOWN_COMPILER) || \
00469 defined(_STLSOFT_FORCE_ANY_COMPILER)
00470 # define __STLSOFT_COMPILER_LABEL_STRING "Unknown (forced) compiler"
00471 # define __STLSOFT_COMPILER_VERSION_STRING "Unknown (forced) compiler"
00472 # define __STLSOFT_COMPILER_IS_UNKNOWN
00473 # else
00474 # error Compiler is not recognised.
00475 # error Currently only Borland C++, Comeau C++, Digital Mars C/C++, GNU C/C++,
00476 # error Intel C/C++, Metrowerks CodeWarrior, Visual C++ and Watcom C/C++
00477 # error compilers are supported by the STLSoft libraries
00478 # error If you want to use the libraries with your compiler, you may specify the
00479 # error _STLSOFT_FORCE_CUSTOM_COMPILER or _STLSOFT_FORCE_ANY_COMPILER pre-processor
00480 # error symbols.
00481 # error _STLSOFT_FORCE_ANY_COMPILER assumes that your compiler can support all
00482 # error modern C++ compiler features, and causes the inclusion of the compiler
00483 # error features file stlsoft_cccap_unknown.h, which is provided by STLSoft.
00484 # error _STLSOFT_FORCE_CUSTOM_COMPILER requires that you specify the name of the
00485 # error compiler features file in __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME.
00486 # error The idea is to use _STLSOFT_FORCE_ANY_COMPILER, to determine what language
00487 # error features your compiler can support, and then copy, edit and use that file
00488 # error via _STLSOFT_FORCE_CUSTOM_COMPILER and __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME.
00489 # endif
00490
00491 #endif
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502 #if defined(_STLSOFT_INCLUDE_UNDEFS) || \
00503 ( defined(_STLSOFT_STRICT) && \
00504 !defined(STLSOFT_NO_UNDEFS))
00505 # include "stlsoft__undefs.h"
00506 #endif
00507
00508
00509
00510 #if defined(__STLSOFT_COMPILER_IS_CUSTOM)
00511 # include __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
00512 #elif defined(__STLSOFT_COMPILER_IS_UNKNOWN)
00513 # include "stlsoft_cccap_unknown.h"
00514 #elif defined(__STLSOFT_COMPILER_IS_BORLAND)
00515 # include "stlsoft_cccap_borland.h"
00516 #elif defined(__STLSOFT_COMPILER_IS_COMO)
00517 # include "stlsoft_cccap_como.h"
00518 #elif defined(__STLSOFT_COMPILER_IS_DMC)
00519 # include "stlsoft_cccap_dmc.h"
00520 #elif defined(__STLSOFT_COMPILER_IS_GCC)
00521 # include "stlsoft_cccap_gcc.h"
00522 #elif defined(__STLSOFT_COMPILER_IS_INTEL)
00523 # include "stlsoft_cccap_intel.h"
00524 #elif defined(__STLSOFT_COMPILER_IS_MSVC)
00525 # include "stlsoft_cccap_msvc.h"
00526 #elif defined(__STLSOFT_COMPILER_IS_MWERKS)
00527 # include "stlsoft_cccap_mwerks.h"
00528 #elif defined(__STLSOFT_COMPILER_IS_VECTORC)
00529 # include "stlsoft_cccap_vectorc.h"
00530 #elif defined(__STLSOFT_COMPILER_IS_WATCOM)
00531 # include "stlsoft_cccap_watcom.h"
00532 #else
00533 # error Compiler not correctly discriminated
00534 #endif
00535
00536 #if defined(_STLSOFT_COMPILE_VERBOSE) && \
00537 !defined(STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT)
00538 # undef _STLSOFT_COMPILE_VERBOSE
00539 # endif
00540
00541 # ifdef _STLSOFT_COMPILE_VERBOSE
00542 # pragma message(__STLSOFT_COMPILER_VERSION_STRING)
00543 # endif
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555 #ifdef _MBCS
00556 # ifdef _STLSOFT_STRICT
00557 # error The STLSoft libraries are not compatible with variable length character representation schemes such as MBCS
00558 # else
00559 # ifdef _STLSOFT_COMPILE_VERBOSE
00560 # pragma message("The STLSoft libraries are not compatible with variable length character representation schemes such as MBCS")
00561 # endif
00562 # endif
00563 #endif
00564
00565
00566
00567
00568 #ifndef __STLSOFT_CF_TEMPLATE_SUPPORT
00569 # error Template support not detected. STLSoft libraries are template-based and require this support.
00570 #endif
00571
00572
00573
00574 #if !defined(STLSOFT_CF_64BIT_INT_SUPPORT) && \
00575 ( defined(STLSOFT_CF_64BIT_INT_IS___int64) || \
00576 defined(STLSOFT_CF_64BIT_INT_IS_long_long))
00577 # error Definition for 64-bit support is not correct. STLSOFT_CF_64BIT_INT_SUPPORT must be defined for 64-bit support
00578 #endif
00579
00580
00581 #ifdef __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
00582 # define stlsoft_oom_fn_qual(Q, T) Q::T
00583 #else
00584 # define stlsoft_oom_fn_qual(Q, T) T
00585 #endif
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609 #ifndef __STLSOFT_CF_EXCEPTION_SUPPORT
00610 # define __STLSOFT_CF_NOTHROW_BAD_ALLOC
00611 #endif
00612
00613 #ifdef __STLSOFT_CF_NOTHROW_BAD_ALLOC
00614 # ifdef __STLSOFT_CF_THROW_BAD_ALLOC
00615 # undef __STLSOFT_CF_THROW_BAD_ALLOC
00616 # endif
00617 #else
00618
00619 #endif
00620
00621
00622
00623
00624 #ifdef __STLSOFT_TEMPLATE_SPECIALISATION
00625 # undef __STLSOFT_TEMPLATE_SPECIALISATION
00626 #endif
00627
00628 #ifdef __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
00629 # define STLSOFT_TEMPLATE_SPECIALISATION template <>
00630 #else
00631 # define STLSOFT_TEMPLATE_SPECIALISATION
00632 #endif
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650 #ifdef _STLSOFT_FORCE_ALL_KEYWORDS
00651 # define _STLSOFT_FORCE_KEYWORD_EXPLICIT
00652 # define _STLSOFT_FORCE_KEYWORD_MUTABLE
00653 # define _STLSOFT_FORCE_KEYWORD_TYPENAME
00654 #endif
00655
00656 #if !defined(__STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT) && \
00657 defined(_STLSOFT_FORCE_KEYWORD_EXPLICIT)
00658 # define __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
00659 #endif
00660
00661 #if !defined(__STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT) && \
00662 defined(_STLSOFT_FORCE_KEYWORD_MUTABLE)
00663 # define __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
00664 #endif
00665
00666 #if !defined(__STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT) && \
00667 defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
00668 # define __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
00669 #endif
00670
00671 #if !defined(__STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT) && \
00672 defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
00673 # define __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
00674 #endif
00675
00676 #if !defined(__STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT) && \
00677 defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
00678 # define __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
00679 #endif
00680
00681 #if !defined(__STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT) && \
00682 defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
00683 # define __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
00684 #endif
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720 #if !defined(STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT) && \
00721 defined(STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT)
00722 # error Cannot rely on use of boolean as pointer to member for operator !
00723 # error Undefine STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT when
00724 # error STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT is not defined
00725 #endif
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738 #if ( defined(_ATLSTL_VER) && \
00739 _ATLSTL_VER <= 0x00010204) || \
00740 ( defined(_COMSTL_VER) && \
00741 _COMSTL_VER <= 0x00010201) || \
00742 ( defined(_MFCSTL_VER) && \
00743 _MFCSTL_VER <= 0x00010202) || \
00744 ( defined(_UNIXSTL_VER) && \
00745 _UNIXSTL_VER <= 0x00000901) || \
00746 ( defined(_WINSTL_VER) && \
00747 _WINSTL_VER <= 0x00010201)
00748 # ifdef _STLSOFT_STRICT
00749 # error You are using an old version of one or more of ATLSTL, COMSTL, MFCSTL, UNIXSTL and WinSTL. Please upgrade all dependent projects in line with the STLSoft version you are using
00750 # else
00751 # ifdef _STLSOFT_COMPILE_VERBOSE
00752 # pragma message("You are using an old version of one or more of ATLSTL, COMSTL, MFCSTL, UNIXSTL and WinSTL. _STLSOFT_INCLUDE_OBSOLETE will be defined (but is not guaranteed to work!)")
00753 # endif
00754 # ifndef _STLSOFT_INCLUDE_OBSOLETE
00755 # define _STLSOFT_INCLUDE_OBSOLETE
00756 # endif
00757 # endif
00758 #endif
00759
00760 #ifdef _STLSOFT_INCLUDE_OBSOLETE
00761 # include "stlsoft_cc_obsolete.h"
00762 #endif
00763
00764
00765
00766
00767
00768 #ifndef _STLSOFT_NO_STD_INCLUDES
00769 # include <stddef.h>
00770 # include <stdlib.h>
00771 #endif
00772
00773
00774
00775
00776
00777
00778
00779 #if defined(_STLSOFT_NO_ASSERT) && \
00780 defined(__STLSOFT_CF_ASSERT_SUPPORT)
00781 # undef __STLSOFT_CF_ASSERT_SUPPORT
00782 #endif
00783
00787 #ifdef __STLSOFT_CF_ASSERT_SUPPORT
00788 # ifdef __STLSOFT_CF_USE_cassert
00789
00790 # include <cassert>
00791 # define stlsoft_assert(ex) assert(ex)
00792 # else
00793
00794
00795
00796 # ifndef __STLSOFT_CF_ASSERT_INCLUDE_NAME
00797 # error Must supply an assert include filename with custom or proprietary assertion mechanism
00798 # else
00799 # include __STLSOFT_CF_ASSERT_INCLUDE_NAME
00800 # endif
00801 # endif
00802 # ifndef stlsoft_assert
00803 # error If your compiler discrimination file supports assertions, it must defined stlsoft_assert() (taking a single parameter)
00804 # endif
00805 #endif
00806
00811 #if defined(__STLSOFT_CF_ASSERT_SUPPORT)
00812 # if defined(__WATCOMC__)
00813 # define stlsoft_message_assert(msg, ex) stlsoft_assert(ex)
00814 # elif defined(__GNUC__) || \
00815 defined(__MWERKS__)
00816 # define stlsoft_message_assert(msg, ex) stlsoft_assert((msg && ex))
00817 # else
00818 # define stlsoft_message_assert(msg, ex) stlsoft_assert((msg, ex))
00819 # endif
00820 #else
00821 # define stlsoft_message_assert(msg, ex)
00822 #endif
00823
00827 #if defined(__STLSOFT_CF_STATIC_ASSERT_SUPPORT)
00828 # if ( defined(__STLSOFT_COMPILER_IS_GCC) && \
00829 ( __GNUC__ < 3 || \
00830 ( __GNUC__ == 3 && \
00831 __GNUC_MINOR__ < 4))) || \
00832 defined(__STLSOFT_COMPILER_IS_INTEL)
00833 # define stlsoft_static_assert(ex) do { typedef int ai[(ex) ? 1 : -1]; } while(0)
00834 # else
00835 # define stlsoft_static_assert(ex) do { typedef int ai[(ex) ? 1 : 0]; } while(0)
00836 # endif
00837 #else
00838 # define stlsoft_static_assert(ex) stlsoft_message_assert("Static assertion failed: ", (ex))
00839 #endif
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859 #ifdef _STLSOFT_NO_NAMESPACES
00860 # define _STLSOFT_NO_NAMESPACE
00861 #endif
00862
00863 #ifndef _STLSOFT_NO_NAMESPACE
00867 namespace stlsoft
00868 {
00869 #endif
00870
00873
00876
00877 #ifndef _STLSOFT_NO_NAMESPACE
00878 # define stlsoft_ns_qual(x) ::stlsoft::x
00879 # define stlsoft_ns_using(x) using ::stlsoft::x;
00880 #else
00881 # define stlsoft_ns_qual(x) x
00882 # define stlsoft_ns_using(x)
00883 #endif
00884
00887
00890
00891 #ifdef __STLSOFT_CF_std_NAMESPACE
00892 # define stlsoft_ns_qual_std(x) ::std::x
00893 # define stlsoft_ns_using_std(x) using ::std::x;
00894 #else
00895 # define stlsoft_ns_qual_std(x) x
00896 # define stlsoft_ns_using_std(x)
00897 #endif
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
00909
00910
00911
00912 #ifndef _STLSOFT_NO_STD_INCLUDES
00913 typedef ptrdiff_t ss_ptrdiff_pr_t_;
00914 #else
00915 typedef int ss_ptrdiff_pr_t_;
00916 #endif
00917
00918
00919
00920 #ifndef _STLSOFT_NO_STD_INCLUDES
00921 typedef size_t ss_size_pr_t_;
00922 #else
00923 typedef unsigned int ss_size_pr_t_;
00924 #endif
00925
00926
00927
00928
00929
00930
00931 #ifdef __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
00932
00933 # ifndef __STLSOFT_NATIVE_WCHAR_T
00934
00935 typedef wchar_t ss_char_w_pr_t_;
00936 # else
00937
00938 typedef __STLSOFT_NATIVE_WCHAR_T ss_char_w_pr_t_;
00939 # endif
00940 #elif defined(__STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT)
00941 typedef wchar_t ss_char_w_pr_t_;
00942 #else
00943
00944 # ifndef _STLSOFT_NO_STD_INCLUDES
00945 typedef wchar_t ss_char_w_pr_t_;
00946 # else
00947 typedef unsigned short ss_char_w_pr_t_;
00948 # endif
00949 #endif
00950
00951
00952 #ifdef STLSOFT_CF_8BIT_INT_SUPPORT
00953 # ifdef STLSOFT_CF_8BIT_INT_IS_EXTENDED_TYPE
00954 typedef STLSOFT_CF_EXTENDED_INT8_T ss_int8_pr_t_;
00955 typedef STLSOFT_CF_EXTENDED_SINT8_T ss_sint8_pr_t_;
00956 typedef STLSOFT_CF_EXTENDED_UINT8_T ss_uint8_pr_t_;
00957 # else
00958 typedef STLSOFT_CF_STANDARD_INT8_T ss_int8_pr_t_;
00959 typedef STLSOFT_CF_STANDARD_SINT8_T ss_sint8_pr_t_;
00960 typedef STLSOFT_CF_STANDARD_UINT8_T ss_uint8_pr_t_;
00961 # endif
00962 #else
00963 # error STLSoft requires 8-bit integer support
00964 #endif
00965
00966
00967 #ifdef STLSOFT_CF_16BIT_INT_SUPPORT
00968 # ifdef STLSOFT_CF_16BIT_INT_IS_EXTENDED_TYPE
00969 typedef STLSOFT_CF_EXTENDED_INT16_T ss_int16_pr_t_;
00970 typedef STLSOFT_CF_EXTENDED_SINT16_T ss_sint16_pr_t_;
00971 typedef STLSOFT_CF_EXTENDED_UINT16_T ss_uint16_pr_t_;
00972 # else
00973 typedef STLSOFT_CF_STANDARD_INT16_T ss_int16_pr_t_;
00974 typedef STLSOFT_CF_STANDARD_SINT16_T ss_sint16_pr_t_;
00975 typedef STLSOFT_CF_STANDARD_UINT16_T ss_uint16_pr_t_;
00976 # endif
00977 #else
00978 # error STLSoft requires 16-bit integer support
00979 #endif
00980
00981
00982 #ifdef STLSOFT_CF_32BIT_INT_SUPPORT
00983 # ifdef STLSOFT_CF_32BIT_INT_IS_EXTENDED_TYPE
00984 typedef STLSOFT_CF_EXTENDED_INT32_T ss_int32_pr_t_;
00985 typedef STLSOFT_CF_EXTENDED_SINT32_T ss_sint32_pr_t_;
00986 typedef STLSOFT_CF_EXTENDED_UINT32_T ss_uint32_pr_t_;
00987 # else
00988 typedef STLSOFT_CF_STANDARD_INT32_T ss_int32_pr_t_;
00989 typedef STLSOFT_CF_STANDARD_SINT32_T ss_sint32_pr_t_;
00990 typedef STLSOFT_CF_STANDARD_UINT32_T ss_uint32_pr_t_;
00991 # endif
00992 #else
00993 # error STLSoft requires 32-bit integer support
00994 #endif
00995
00996
00997 #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
00998 # ifdef STLSOFT_CF_64BIT_INT_IS_EXTENDED_TYPE
00999 typedef STLSOFT_CF_EXTENDED_INT64_T ss_int64_pr_t_;
01000 typedef STLSOFT_CF_EXTENDED_SINT64_T ss_sint64_pr_t_;
01001 typedef STLSOFT_CF_EXTENDED_UINT64_T ss_uint64_pr_t_;
01002 # else
01003 typedef STLSOFT_CF_STANDARD_INT64_T ss_int64_pr_t_;
01004 typedef STLSOFT_CF_STANDARD_SINT64_T ss_sint64_pr_t_;
01005 typedef STLSOFT_CF_STANDARD_UINT64_T ss_uint64_pr_t_;
01006 # endif
01007 #endif
01008
01009
01010 #ifdef __STLSOFT_CF_NATIVE_BOOL_SUPPORT
01011 typedef bool ss_bool_pr_t_;
01012 #else
01013 typedef unsigned int ss_bool_pr_t_;
01014 #endif
01015
01016 #endif
01017
01018
01019
01020 typedef char ss_char_a_t;
01021 typedef ss_char_w_pr_t_ ss_char_w_t;
01022 typedef ss_int8_pr_t_ ss_int8_t;
01023 typedef ss_sint8_pr_t_ ss_sint8_t;
01024 typedef ss_uint8_pr_t_ ss_uint8_t;
01025 typedef ss_int16_pr_t_ ss_int16_t;
01026 typedef ss_sint16_pr_t_ ss_sint16_t;
01027 typedef ss_uint16_pr_t_ ss_uint16_t;
01028 typedef ss_int32_pr_t_ ss_int32_t;
01029 typedef ss_sint32_pr_t_ ss_sint32_t;
01030 typedef ss_uint32_pr_t_ ss_uint32_t;
01031 #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
01032 typedef ss_int64_pr_t_ ss_int64_t;
01033 typedef ss_sint64_pr_t_ ss_sint64_t;
01034 typedef ss_uint64_pr_t_ ss_uint64_t;
01035 #endif
01036 typedef short ss_short_t;
01037 typedef int ss_int_t;
01038 typedef signed int ss_sint_t;
01039 typedef unsigned int ss_uint_t;
01040 typedef long ss_long_t;
01041 typedef ss_uint8_t ss_byte_t;
01042 typedef ss_bool_pr_t_ ss_bool_t;
01043 typedef ss_size_pr_t_ ss_size_t;
01044 typedef ss_ptrdiff_pr_t_ ss_ptrdiff_t;
01045 typedef long ss_streampos_t;
01046 typedef long ss_streamoff_t;
01047
01048 #ifndef _STLSOFT_NO_NAMESPACE
01049 typedef ss_char_a_t char_a_t;
01050 typedef ss_char_w_t char_w_t;
01051 typedef ss_int8_t int8_t;
01052 typedef ss_sint8_t sint8_t;
01053 typedef ss_uint8_t uint8_t;
01054 typedef ss_int16_t int16_t;
01055 typedef ss_sint16_t sint16_t;
01056 typedef ss_uint16_t uint16_t;
01057 typedef ss_int32_t int32_t;
01058 typedef ss_sint32_t sint32_t;
01059 typedef ss_uint32_t uint32_t;
01060 # ifdef STLSOFT_CF_64BIT_INT_SUPPORT
01061 typedef ss_int64_t int64_t;
01062 typedef ss_sint64_t sint64_t;
01063 typedef ss_uint64_t uint64_t;
01064 # endif
01065 typedef ss_short_t short_t;
01066 typedef ss_int_t int_t;
01067 typedef ss_sint_t sint_t;
01068 typedef ss_uint_t uint_t;
01069 typedef ss_long_t long_t;
01070 typedef ss_byte_t byte_t;
01071 typedef ss_bool_t bool_t;
01072 # if !defined(__STLSOFT_COMPILER_IS_DMC)
01073 typedef ss_size_t size_t;
01074 typedef ss_ptrdiff_t ptrdiff_t;
01075 typedef ss_streampos_t streampos_t;
01076 typedef ss_streamoff_t streamoff_t;
01077 # endif
01078 #endif
01079
01080
01081 #if 0
01082 template <ss_size_t N>
01083 struct uintp_traits;
01084
01085 STLSOFT_GEN_TRAIT_SPECIALISATION
01086 struct uintp_traits<1>
01087 {
01088 typedef uint8_t unsigned_type;
01089 }
01090
01091 typedef size_traits<sizeof(void*)>::signed_type sintp_t;
01092 typedef size_traits<sizeof(void*)>::unsigned_type uintp_t;
01093
01094 #endif
01095
01096
01097
01098 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
01099 # ifdef __cplusplus
01100 struct stlsoft_size_checker
01101 {
01102 # ifdef __STLSOFT_COMPILER_IS_GCC
01103 protected:
01104 # else
01105 private:
01106 # endif
01107 stlsoft_size_checker();
01108 ~stlsoft_size_checker()
01109 {
01110
01111 stlsoft_static_assert(sizeof(ss_char_a_t) >= 1);
01112 stlsoft_static_assert(sizeof(ss_char_w_t) >= 2);
01113
01114 stlsoft_static_assert(sizeof(ss_int8_t) == 1);
01115 stlsoft_static_assert(sizeof(ss_sint8_t) == sizeof(ss_int8_t));
01116 stlsoft_static_assert(sizeof(ss_uint8_t) == sizeof(ss_int8_t));
01117
01118 stlsoft_static_assert(sizeof(ss_int16_t) == 2);
01119 stlsoft_static_assert(sizeof(ss_sint16_t) == sizeof(ss_int16_t));
01120 stlsoft_static_assert(sizeof(ss_uint16_t) == sizeof(ss_int16_t));
01121
01122 stlsoft_static_assert(sizeof(ss_int32_t) == 4);
01123 stlsoft_static_assert(sizeof(ss_sint32_t) == sizeof(ss_int32_t));
01124 stlsoft_static_assert(sizeof(ss_uint32_t) == sizeof(ss_int32_t));
01125
01126 # ifdef STLSOFT_CF_64BIT_INT_SUPPORT
01127 stlsoft_static_assert(sizeof(ss_int64_t) == 8);
01128 stlsoft_static_assert(sizeof(ss_sint64_t) == sizeof(ss_int64_t));
01129 stlsoft_static_assert(sizeof(ss_uint64_t) == sizeof(ss_int64_t));
01130 # endif
01131
01132 stlsoft_static_assert(sizeof(ss_int_t) >= 1);
01133 stlsoft_static_assert(sizeof(ss_sint_t) == sizeof(ss_int_t));
01134 stlsoft_static_assert(sizeof(ss_uint_t) == sizeof(ss_int_t));
01135 stlsoft_static_assert(sizeof(ss_long_t) >= sizeof(ss_int_t));
01136
01137 stlsoft_static_assert(sizeof(ss_byte_t) == 1);
01138
01139 stlsoft_static_assert(sizeof(ss_bool_t) >= 1);
01140
01141 stlsoft_static_assert(sizeof(ss_size_t) >= 1);
01142 stlsoft_static_assert(sizeof(ss_ptrdiff_t) >= 1);
01143 stlsoft_static_assert(sizeof(ss_streampos_t) >= 1);
01144 stlsoft_static_assert(sizeof(ss_streamoff_t) >= 1);
01145 }
01146 };
01147 # endif
01148 #endif
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165
01169 #ifdef __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
01170 # define ss_explicit_k explicit
01171 #else
01172 # define ss_explicit_k
01173 #endif
01174
01178 #ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
01179 # define ss_mutable_k mutable
01180 #else
01181 # define ss_mutable_k
01182 #endif
01183
01187 #ifdef __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
01188 # define ss_typename_param_k typename
01189 #else
01190 # define ss_typename_param_k class
01191 #endif
01192
01196 #ifdef __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
01197 # define ss_typename_type_k typename
01198 #else
01199 # define ss_typename_type_k
01200 #endif
01201
01205 #ifdef __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
01206 # define ss_typename_type_def_k typename
01207 #else
01208 # define ss_typename_type_def_k
01209 #endif
01210
01214 #ifdef __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
01215 # define ss_typename_type_mil_k typename
01216 #else
01217 # define ss_typename_type_mil_k
01218 #endif
01219
01220
01221
01222 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
01223
01224
01225
01226
01227
01228
01229
01230
01231 #ifdef __STLSOFT_CF_NATIVE_BOOL_SUPPORT
01232 # define ss_true_v (true)
01233 # define ss_false_v (false)
01234 #else
01235 # define ss_true_v (1)
01236 # define ss_false_v (0)
01237 #endif
01238
01239 #endif
01240
01241
01242
01243
01249
01250
01251 #if !defined(STLSOFT_NO_USE_EXCEPTION_SPECIFICATIONS) && \
01252 !defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) && \
01253 ( defined(STLSOFT_USE_EXCEPTION_SPECIFICATIONS) || \
01254 defined(__STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT))
01255 # ifndef STLSOFT_USE_EXCEPTION_SPECIFICATIONS
01256 # define STLSOFT_USE_EXCEPTION_SPECIFICATIONS
01257 # endif
01258 # define stlsoft_throw_0() throw ()
01259 # define stlsoft_throw_1(x1) throw (x1)
01260 # define stlsoft_throw_2(x1, x2) throw (x1, x2)
01261 # define stlsoft_throw_3(x1, x2, x3) throw (x1, x2, x3)
01262 # define stlsoft_throw_4(x1, x2, x3, x4) throw (x1, x2, x3, x4)
01263 # define stlsoft_throw_5(x1, x2, x3, x4, x5) throw (x1, x2, x3, x4, x5)
01264 # define stlsoft_throw_6(x1, x2, x3, x4, x5, x6) throw (x1, x2, x3, x4, x5, x6)
01265 # define stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7) throw (x1, x2, x3, x4, x5, x6, x7)
01266 # define stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) throw (x1, x2, x3, x4, x5, x6, x7, x8)
01267 #else
01268 # ifdef STLSOFT_USE_EXCEPTION_SPECIFICATIONS
01269 # undef STLSOFT_USE_EXCEPTION_SPECIFICATIONS
01270 # endif
01271 # define stlsoft_throw_0()
01272 # define stlsoft_throw_1(x1)
01273 # define stlsoft_throw_2(x1, x2)
01274 # define stlsoft_throw_3(x1, x2, x3)
01275 # define stlsoft_throw_4(x1, x2, x3, x4)
01276 # define stlsoft_throw_5(x1, x2, x3, x4, x5)
01277 # define stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
01278 # define stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
01279 # define stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
01280 #endif
01281
01314
01315 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
01316 # define stlsoft_num_elements_(ar) (sizeof(ar) / sizeof(0[(ar)]))
01317
01318 # if defined(__cplusplus) && \
01319 defined(__STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT)
01320 # if 0
01321 # pragma pack(push, 1)
01322 template <int N>
01323 struct ss_array_size_struct
01324 {
01325 ss_byte_t c[N];
01326 };
01327 # pragma pack(pop)
01328
01329 template <class T, int N>
01330 ss_array_size_struct<N> ss_static_array_size(T (&)[N]);
01331
01332 # define stlsoft_num_elements(ar) sizeof(stlsoft_ns_qual(ss_static_array_size)(ar))
01333 # else
01334 template <int N>
01335 struct ss_array_size_struct
01336 {
01337 ss_byte_t c[N];
01338 };
01339
01340 template <class T, int N>
01341 ss_array_size_struct<N> ss_static_array_size(T (&)[N]);
01342
01343 #if defined(__STLSOFT_COMPILER_IS_VECTORC)
01344 template <class T, int N>
01345 ss_array_size_struct<N> ss_static_array_size(T const (&)[N]);
01346 #endif
01347
01348
01349 # define stlsoft_num_elements(ar) sizeof(stlsoft_ns_qual(ss_static_array_size)(ar).c)
01350 # endif
01351 # else
01352 # define stlsoft_num_elements(ar) stlsoft_num_elements_(ar)
01353 # endif
01354 #else
01355 # define stlsoft_num_elements(ar)
01356 #endif
01357
01361
01362 #if defined(__STLSOFT_COMPILER_IS_GCC) && \
01363 __GNUC__ >= 3
01364 # define stlsoft_raw_offsetof(s, m) (reinterpret_cast<stlsoft_ns_qual(ss_size_t)>(&reinterpret_cast<s *>(1)->m) - 1)
01365 #else
01366 # ifndef _STLSOFT_NO_STD_INCLUDES
01367 # define stlsoft_raw_offsetof(s, m) offsetof(s, m)
01368 # else
01369 # define stlsoft_raw_offsetof(s, m) reinterpret_cast<stlsoft_ns_qual(ss_size_t)>(&static_cast<s *>(0)->m)
01370 # endif
01371 #endif
01372
01373
01374
01375 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
01376 template <ss_typename_param_k T>
01377 inline void stlsoft_destroy_instance_fn(T *p)
01378 {
01379 p->~T();
01380
01381
01382
01383
01384
01385 ((void)p);
01386 }
01387 #endif
01388
01392 #if defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) || \
01393 defined(__STLSOFT_COMPILER_IS_DMC)
01394 # define stlsoft_destroy_instance(t, _type, p) do { (p)->~t(); } while(0)
01395 #else
01396 # define stlsoft_destroy_instance(t, _type, p) stlsoft_ns_qual(stlsoft_destroy_instance_fn)((p))
01397 #endif
01398
01415
01416 #define stlsoft_gen_opaque(type) typedef struct __stlsoft_htype##type{ int i;} const *type;
01417
01448
01449 #if defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) || \
01450 defined(__STLSOFT_COMPILER_IS_BORLAND) || \
01451 defined(__STLSOFT_COMPILER_IS_COMO) || \
01452 defined(__STLSOFT_COMPILER_IS_DMC) || \
01453 ( defined(__STLSOFT_COMPILER_IS_GCC) && \
01454 __GNUC__ < 3) || \
01455 defined(__STLSOFT_COMPILER_IS_INTEL) || \
01456 defined(__STLSOFT_COMPILER_IS_MSVC) || \
01457 defined(__STLSOFT_COMPILER_IS_VECTORC) || \
01458 defined(__STLSOFT_COMPILER_IS_WATCOM)
01459 # define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) friend T
01460 #elif defined(__STLSOFT_COMPILER_IS_MWERKS)
01461 # define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) friend class T
01462 #elif defined(__STLSOFT_COMPILER_IS_GCC) && \
01463 __GNUC__ >= 3
01464
01465 # if __GNUC_MINOR__ > 2
01466
01467
01468
01469
01470 # define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) \
01471 \
01472 struct friend_maker \
01473 { \
01474 typedef T T2; \
01475 }; \
01476 \
01477 friend class friend_maker::T2
01478
01479 # else
01480
01481 # define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) \
01482 \
01483 struct friend_maker \
01484 { \
01485 typedef T T2; \
01486 }; \
01487 \
01488 typedef typename friend_maker::T2 friend_type; \
01489 \
01490 friend friend_type
01491
01492 # endif
01493
01494 #else
01495 # error Compiler not discriminated
01496 #endif
01497
01498
01504 #define STLSOFT_GEN_TRAIT_SPECIALISATION(TR, T, V) \
01505 \
01506 STLSOFT_TEMPLATE_SPECIALISATION \
01507 struct TR<T> \
01508 { \
01509 enum { value = V }; \
01510 };
01511
01512
01518 #if defined(__STLSOFT_COMPILER_IS_COMO) || \
01519 defined(__STLSOFT_COMPILER_IS_DMC) || \
01520 defined(__STLSOFT_COMPILER_IS_GCC) || \
01521 defined(__STLSOFT_COMPILER_IS_INTEL)
01522 template<ss_typename_param_k T>
01523 inline void suppress_unused_func(T const volatile &)
01524 {}
01525 # define STLSOFT_SUPPRESS_UNUSED(x) stlsoft_ns_qual(suppress_unused_func)(x)
01526 #else
01527 # define STLSOFT_SUPPRESS_UNUSED(x) ((void)x)
01528 #endif
01529
01530
01531
01533
01538
01544 template <ss_typename_param_k T>
01545 inline void const *ptr_byte_offset(T const p, ss_ptrdiff_t n)
01546 {
01547 return static_cast<void const *>(static_cast<ss_byte_t const *>(static_cast<void const *>(p)) + n);
01548 }
01549
01555 template <ss_typename_param_k T>
01556 inline T const *ptr_offset(T const *p, ss_ptrdiff_t n)
01557 {
01558 return p + n;
01559 }
01560
01562 template <ss_typename_param_k T1, ss_typename_param_k T2>
01563 inline ss_ptrdiff_t ptr_byte_diff(T1 const *p1, T2 const *p2)
01564 {
01565 return static_cast<ss_byte_t const *>(static_cast<void const *>(p1)) - static_cast<ss_byte_t const *>(static_cast<void const *>(p2));
01566 }
01567
01569 template <ss_typename_param_k T1, ss_typename_param_k T2>
01570 inline ss_ptrdiff_t ptr_diff(T1 const *p1, T2 const *p2)
01571 {
01572 return p1 - p2;
01573 }
01574
01576
01578 template <ss_typename_param_k T>
01579 inline T &remove_const(T const &t)
01580 {
01581 return const_cast<T &>(t);
01582 }
01583
01584
01585 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
01586 template <ss_typename_param_k T>
01587 #ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
01588 inline T &mutable_access(T &t)
01589 #else
01590 inline T &mutable_access(T const &t)
01591 #endif
01592 {
01593 #ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
01594 return t;
01595 #else
01596 return const_cast<T &>(t);
01597 #endif
01598 }
01599 #endif
01600
01601
01602 #ifdef __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
01603 # define stlsoft_define_move_rhs_type(t) t &
01604 #else
01605 # define stlsoft_define_move_rhs_type(t) t const &
01606 #endif
01607
01608 template <ss_typename_param_k T>
01609 inline T &move_lhs_from_rhs(stlsoft_define_move_rhs_type(T) t)
01610 {
01611 #ifdef __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
01612 return t;
01613 #else
01614 return const_cast<T &>(t);
01615 #endif
01616 }
01617
01618
01619
01620
01621
01622
01623
01624
01625
01626
01627 #ifdef _STLSOFT_NO_NAMESPACE
01628 # if defined(__STLSOFT_COMPILER_IS_BORLAND) && \
01629 __BORLANDC__ < 0x0550
01630 # include <new.h>
01631 # else
01632 # include <new>
01633 # endif
01634 #else
01635 # if ( defined(__STLSOFT_COMPILER_IS_DMC) && \
01636 __DMC__ < 0x0833) || \
01637 ( defined(__STLSOFT_COMPILER_IS_MSVC) && \
01638 _MSC_VER < 1300)
01639 inline void *operator new(ss_size_t , void *pv)
01640 {
01641 return pv;
01642 }
01643 # endif
01644 #endif
01645
01646
01647
01648
01649
01650
01651
01652
01653
01654
01655
01656 #ifdef STLSOFT_UNITTEST
01657 # ifndef STLSOFT_INCL_H_STLSOFT_UNITTEST
01658 # include "stlsoft_unittest.h"
01659 # endif
01660 #endif
01661
01662
01663
01664
01665
01666