📄 stlsoft.h
字号:
/* /////////////////////////////////////////////////////////////////////////
* File: stlsoft/stlsoft.h (formerly stlsoft.h)
*
* Purpose: Root header for the STLSoft libraries. Performs various compiler
* and platform discriminations, and definitions of types.
*
* Created: 15th January 2002
* Updated: 10th June 2006
*
* Home: http://stlsoft.org/
*
* Copyright (c) 2002-2006, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
* any contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* ////////////////////////////////////////////////////////////////////// */
#ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
#define STLSOFT_INCL_STLSOFT_H_STLSOFT
#define STLSOFT_INCL_H_STLSOFT /*!< \brief Definition of previous include-guard symbol for stlsoft/stlsoft.h, for backwards compatibility. */
#if defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) && \
!defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
# define STLSOFT_DOCUMENTATION_SKIP_SECTION
#elif !defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) && \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
# define __STLSOFT_DOCUMENTATION_SKIP_SECTION
#endif /* __STLSOFT_DOCUMENTATION_SKIP_SECTION && !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MAJOR 3
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MINOR 5
# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 5
# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 274
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/** \file stlsoft/stlsoft.h \brief [C, C++] The root header for the \ref group__project__stlsoft "STLSoft" project, and for all other \ref group__projects "projects". */
/* /////////////////////////////////////////////////////////////////////////
* STLSoft version
*
* The libraries version information is comprised of major, minor and revision
* components.
*
* The major version is denoted by the _STLSOFT_VER_MAJOR preprocessor symbol.
* A changes to the major version component implies that a dramatic change has
* occured in the libraries, such that considerable changes to source dependent
* on previous versions would need to be effected.
*
* The minor version is denoted by the _STLSOFT_VER_MINOR preprocessor symbol.
* Changes to the minor version component imply that a significant change has
* occured to the libraries, either in the addition of new functionality or in
* the destructive change to one or more components such that recomplilation and
* code change may be necessitated.
*
* The revision version is denoted by the _STLSOFT_VER_REVISIO preprocessor
* symbol. Changes to the revision version component imply that a bug has been
* fixed. Dependent code should be recompiled in order to pick up the changes.
*
* In addition to the individual version symbols - _STLSOFT_VER_MAJOR,
* _STLSOFT_VER_MINOR and _STLSOFT_VER_REVISION - a composite symbol _STLSOFT_VER
* is defined, where the upper 8 bits are 0, bits 16-23 represent the major
* component, bits 8-15 represent the minor component, and bits 0-7 represent
* the revision component.
*
* Each release of the libraries will bear a different version, and that version
* will also have its own symbol: Version 1.0.1 specifies _STLSOFT_VER_1_0_1.
*
* Thus the symbol _STLSOFT_VER may be compared meaningfully with a specific
* version symbol, e.g.# if _STLSOFT_VER >= _STLSOFT_VER_1_0_1
*/
/** \def _STLSOFT_VER_MAJOR
* \brief The major version number of STLSoft
*/
/** \def _STLSOFT_VER_MINOR
* \brief The minor version number of STLSoft
*/
/** \def _STLSOFT_VER_REVISION
* \brief The revision version number of STLSoft
*/
/** \def _STLSOFT_VER
* \brief The current composite version number of STLSoft
*/
#define _STLSOFT_VER_MAJOR 1
#define _STLSOFT_VER_MINOR 9
#define _STLSOFT_VER_REVISION 1
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _STLSOFT_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
# define _STLSOFT_VER_1_0_2 0x00010002 /*!< Version 1.0.2 */
# define _STLSOFT_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
# define _STLSOFT_VER_1_1_2 0x00010102 /*!< Version 1.1.2 */
# define _STLSOFT_VER_1_1_3 0x00010103 /*!< Version 1.1.3 */
# define _STLSOFT_VER_1_2_1 0x00010201 /*!< Version 1.2.1 */
# define _STLSOFT_VER_1_3_1 0x00010301 /*!< Version 1.3.1 */
# define _STLSOFT_VER_1_3_2 0x00010302 /*!< Version 1.3.2 */
# define _STLSOFT_VER_1_4_1 0x00010401 /*!< Version 1.4.1 */
# define _STLSOFT_VER_1_4_2 0x00010402 /*!< Version 1.4.2 */
# define _STLSOFT_VER_1_4_3 0x00010403 /*!< Version 1.4.3 */
# define _STLSOFT_VER_1_4_4 0x00010404 /*!< Version 1.4.4 */
# define _STLSOFT_VER_1_4_5 0x00010405 /*!< Version 1.4.5 */
# define _STLSOFT_VER_1_4_6 0x00010406 /*!< Version 1.4.6 */
# define _STLSOFT_VER_1_5_1 0x00010501 /*!< Version 1.5.1 */
# define _STLSOFT_VER_1_5_2 0x00010502 /*!< Version 1.5.2 */
# define _STLSOFT_VER_1_6_1 0x00010601 /*!< Version 1.6.1 */
# define _STLSOFT_VER_1_6_2 0x00010602 /*!< Version 1.6.2 */
# define _STLSOFT_VER_1_6_3 0x00010603 /*!< Version 1.6.3 */
# define _STLSOFT_VER_1_6_4 0x00010604 /*!< Version 1.6.4 */
# define _STLSOFT_VER_1_6_5 0x00010605 /*!< Version 1.6.5 */
# define _STLSOFT_VER_1_6_6 0x00010606 /*!< Version 1.6.6 */
# define _STLSOFT_VER_1_7_1 0x00010701 /*!< Version 1.7.1 */
# define _STLSOFT_VER_1_7_2 0x00010702 /*!< Version 1.7.2 */
# define _STLSOFT_VER_1_8_1 0x00010801 /*!< Version 1.8.1 */
# define _STLSOFT_VER_1_8_2 0x00010802 /*!< Version 1.8.2 */
# define _STLSOFT_VER_1_8_3 0x00010803 /*!< Version 1.8.3 */
# define _STLSOFT_VER_1_8_4 0x00010804 /*!< Version 1.8.4 */
# define _STLSOFT_VER_1_8_5 0x00010805 /*!< Version 1.8.5 */
# define _STLSOFT_VER_1_8_6 0x00010806 /*!< Version 1.8.6 */
# define _STLSOFT_VER_1_8_7 0x00010807 /*!< Version 1.8.7 */
# define _STLSOFT_VER_1_8_8 0x00010808 /*!< Version 1.8.8 */
# define _STLSOFT_VER_1_8_9 0x00010809 /*!< Version 1.8.9 */
# define _STLSOFT_VER_1_9_1 0x00010901 /*!< Version 1.9.1 (12th Dec 2005) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _STLSOFT_VER _STLSOFT_VER_1_9_1
/* /////////////////////////////////////////////////////////////////////////
* Basic macros
*/
/* Compilation messages
*
* To see certain informational messages during compilation define the
* preprocessor symbol _STLSOFT_COMPILE_VERBOSE
*/
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_STRINGIZE_(x) #x
# define STLSOFT_STRINGIZE(x) STLSOFT_STRINGIZE_(x)
/* Simple macro indirection */
# define STLSOFT_MACRO_INDIRECT(x) x
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
* Sanity checks - 1
*/
/* /////////////////////////////////////////////////////////////////////////
* Compiler compatibility
*
* Currently the only compilers supported by the STLSoft libraries are
*
* Borland C++ 5.5, 5.51, 5.6 & 5.6.4
* Comeau 4.3.0.1 & 4.3.3
* Digital Mars C/C++ 8.26 and above
* GCC 2.95, 2.96, 3.2, 3.3, 3.4 & 4.0
* Intel C/C++ 6.0, 7.0, 7.1, 8.0
* Metrowerks 2.4 & 3.0 (CodeWarrior 7.0 & 8.0)
* Visual C++ 4.2, 5.0, 6.0, 7.0 (.NET), 7.1 (.NET 2003), 8.0
* Watcom C/C++ 11.0, 12.0, 13.0
*/
#ifdef STLSOFT_COMPILER_IS_UNKNOWN
# undef STLSOFT_COMPILER_IS_UNKNOWN
#endif /* STLSOFT_COMPILER_IS_UNKNOWN */
#ifdef STLSOFT_COMPILER_IS_BORLAND
# undef STLSOFT_COMPILER_IS_BORLAND
#endif /* STLSOFT_COMPILER_IS_BORLAND */
#ifdef STLSOFT_COMPILER_IS_COMO
# undef STLSOFT_COMPILER_IS_COMO
#endif /* STLSOFT_COMPILER_IS_COMO */
#ifdef STLSOFT_COMPILER_IS_DMC
# undef STLSOFT_COMPILER_IS_DMC
#endif /* STLSOFT_COMPILER_IS_DMC */
#ifdef STLSOFT_COMPILER_IS_GCC
# undef STLSOFT_COMPILER_IS_GCC
#endif /* STLSOFT_COMPILER_IS_GCC */
#ifdef STLSOFT_COMPILER_IS_INTEL
# undef STLSOFT_COMPILER_IS_INTEL
#endif /* STLSOFT_COMPILER_IS_INTEL */
#ifdef STLSOFT_COMPILER_IS_MSVC
# undef STLSOFT_COMPILER_IS_MSVC
#endif /* STLSOFT_COMPILER_IS_MSVC */
#ifdef STLSOFT_COMPILER_IS_MWERKS
# undef STLSOFT_COMPILER_IS_MWERKS
#endif /* STLSOFT_COMPILER_IS_MWERKS */
#ifdef STLSOFT_COMPILER_IS_VECTORC
# undef STLSOFT_COMPILER_IS_VECTORC
#endif /* STLSOFT_COMPILER_IS_VECTORC */
#ifdef STLSOFT_COMPILER_IS_WATCOM
# undef STLSOFT_COMPILER_IS_WATCOM
#endif /* STLSOFT_COMPILER_IS_WATCOM */
/* Strict compability fix
*/
#if defined(_STLSOFT_STRICT) && \
!defined(STLSOFT_STRICT)
# define STLSOFT_STRICT
#endif /* _STLSOFT_STRICT && !STLSOFT_STRICT */
/* First we do a check to see whether other compilers are providing
* compatibility with Visual C++, and handle that.
*/
#ifdef _MSC_VER
# if defined(__BORLANDC__) || /* Borland C/C++ */ \
defined(__COMO__) || /* Comeau C/C++ */ \
defined(__DMC__) || /* Digital Mars C/C++ */ \
defined(__GNUC__) || /* GNU C/C++ */ \
defined(__INTEL_COMPILER) || /* Intel C/C++ */ \
defined(__MWERKS__) || /* Metrowerks C/C++ */ \
defined(__WATCOMC__) /* Watcom C/C++ */
/* Handle Microsoft Visual C++ support. */
# if defined(_STLSOFT_NO_MSC_VER_SUPPORT) || \
( defined(STLSOFT_STRICT) && \
!defined(_STLSOFT_MSC_VER_SUPPORT))
# undef _MSC_VER
# endif /* _STLSOFT_NO_MSC_VER_SUPPORT || (STLSOFT_STRICT && _STLSOFT_MSC_VER_SUPPORT) */
# endif /* compiler */
#endif /* _MSC_VER */
#if defined(_STLSOFT_FORCE_CUSTOM_COMPILER)
# define STLSOFT_COMPILER_LABEL_STRING "Custom (forced) compiler"
# define STLSOFT_COMPILER_VERSION_STRING "Custom (forced) compiler"
# define __STLSOFT_COMPILER_IS_CUSTOM
# define STLSOFT_COMPILER_IS_CUSTOM
# ifndef __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
# 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/internal/cccap/my_compiler.h>
# endif /* !__STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME */
#elif defined(__COMO__) /* Do Comeau next, so that no Comeau back-end server compilers are preferentially discriminated */
/* Comeau C++ */
# define __STLSOFT_COMPILER_IS_COMO
# define STLSOFT_COMPILER_IS_COMO
# define STLSOFT_COMPILER_LABEL_STRING "Comeau C++"
# if __COMO_VERSION__ < 4300
# error Only versions 4.3.0.1 and later of Comeau C++ compiler is supported by the STLSoft libraries
# elif (__COMO_VERSION__ == 4300)
# define STLSOFT_COMPILER_VERSION_STRING "Comeau C++ 4.3.0.1"
# elif (__COMO_VERSION__ == 4303)
# define STLSOFT_COMPILER_VERSION_STRING "Comeau C++ 4.3.3"
# else /* ? __COMO_VERSION__ */
# define STLSOFT_COMPILER_VERSION_STRING "Unknown version of Comeau C++"
# endif /* __COMO_VERSION__ */
#elif defined(__BORLANDC__)
/* Borland C++ */
# define __STLSOFT_COMPILER_IS_BORLAND
# define STLSOFT_COMPILER_IS_BORLAND
# define STLSOFT_COMPILER_LABEL_STRING "Borland C/C++"
# if 0 /* (__BORLANDC__ == 0x0460) */
# define STLSOFT_COMPILER_VERSION_STRING "Borland C++ 4.52"
# elif 0 /* (__BORLANDC__ == 0x0550) */
# define STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.5"
# elif (__BORLANDC__ == 0x0551)
# define STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.51"
# elif (__BORLANDC__ == 0x0560)
# define STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.6"
# elif (__BORLANDC__ == 0x0564)
# define STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.6.4 (C++ BuilderX)"
# else /* ? __BORLANDC__ */
/*# error Currently only versions 4.52, 5.5, 5.51 and 5.6 of the Borland C++ compiler are supported by the STLSoft libraries */
# error Currently only versions 5.51, 5.6 and 5.6.4 of the Borland C++ compiler are supported by the STLSoft libraries
# endif /* __BORLANDC__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -