⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stlsoft.h

📁 用STL的方式封装了WindowsAPI、COM调用、ACE、ATL、MFC、WTL等多种组件
💻 H
📖 第 1 页 / 共 5 页
字号:

#elif defined(__DMC__)
/* Digital Mars C/C++ */
# define __STLSOFT_COMPILER_IS_DMC
# define STLSOFT_COMPILER_IS_DMC
# define STLSOFT_COMPILER_LABEL_STRING          "Digital Mars C/C++"
# if (__DMC__ < 0x0826)
#  error Only versions 8.26 and later of the Digital Mars C/C++ compilers are supported by the STLSoft libraries
# else /* ? __DMC__ */
#  if __DMC__ >= 0x0832
#   define STLSOFT_COMPILER_VERSION_STRING      __DMC_VERSION_STRING__
#  elif (__DMC__ == 0x0826)
#   define STLSOFT_COMPILER_VERSION_STRING      "Digital Mars C/C++ 8.26"
#  elif (__DMC__ == 0x0827)
#   define STLSOFT_COMPILER_VERSION_STRING      "Digital Mars C/C++ 8.27"
#  elif (__DMC__ == 0x0828)
#   define STLSOFT_COMPILER_VERSION_STRING      "Digital Mars C/C++ 8.28"
#  elif (__DMC__ == 0x0829)
#   define STLSOFT_COMPILER_VERSION_STRING      "Digital Mars C/C++ 8.29"
#  elif (__DMC__ == 0x0830)
#   define STLSOFT_COMPILER_VERSION_STRING      "Digital Mars C/C++ 8.30"
#  elif (__DMC__ == 0x0831)
#   define STLSOFT_COMPILER_VERSION_STRING      "Digital Mars C/C++ 8.31"
#  endif /* __DMC__ */
# endif /* version */

#elif defined(__INTEL_COMPILER)
/* Intel C++ */
# define __STLSOFT_COMPILER_IS_INTEL
# define STLSOFT_COMPILER_IS_INTEL
# define STLSOFT_COMPILER_LABEL_STRING          "Intel C/C++"
# if (__INTEL_COMPILER == 600)
#  define STLSOFT_COMPILER_VERSION_STRING       "Intel C/C++ 6.0"
# elif (__INTEL_COMPILER == 700)
#  define STLSOFT_COMPILER_VERSION_STRING       "Intel C/C++ 7.0"
# elif (__INTEL_COMPILER == 800)
#  define STLSOFT_COMPILER_VERSION_STRING       "Intel C/C++ 8.0"
# else /* ? __INTEL_COMPILER */
#  error Only Intel C++ Compiler versions 6.0, 7.0(/7.1) and 8.0 currently supported by the STLSoft libraries
# endif /* __INTEL_COMPILER */

#elif defined(__GNUC__)
/* GNU C/C++ */
# define __STLSOFT_COMPILER_IS_GCC
# define STLSOFT_COMPILER_IS_GCC
# define STLSOFT_COMPILER_LABEL_STRING          "GNU C/C++"
# if __GNUC__ != 2 && \
     __GNUC__ != 3 && \
     __GNUC__ != 4
#  error GNU C/C++ compilers whose major version is not 2, 3 or 4 are not currently supported by the STLSoft libraries
# elif __GNUC__ == 2
#  if __GNUC_MINOR__ < 95
#   error Currently only version 2.95 and above of the GNU C/C++ compiler is supported by the STLSoft libraries
#  elif __GNUC_MINOR__ == 95
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ 2.95"
#  elif __GNUC_MINOR__ == 96
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ 2.96"
#  else /* ? __GNUC_MINOR__ */
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ >2.96 - you should be aware that this version may not be supported correctly"
#  endif /* __GNUC_MINOR__  */
# elif __GNUC__ == 3
#  if __GNUC_MINOR__ == 2
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ 3.2"
#  elif __GNUC_MINOR__ == 3
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ 3.3"
#  elif __GNUC_MINOR__ == 4
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ 3.4"
#  else /* ? __GNUC_MINOR__ */
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ >3.4 - you should be aware that this version may not be supported correctly"
#  endif /* __GNUC_MINOR__  */
# elif __GNUC__ == 0
#  if __GNUC_MINOR__ == 0
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ 4.0"
#  else /* ? __GNUC_MINOR__ */
#   define STLSOFT_COMPILER_VERSION_STRING      "GNU C/C++ >4.0 - you should be aware that this version may not be supported correctly"
#  endif /* __GNUC__  */
# endif /* __GNUC_MINOR__ */

#elif defined(__MWERKS__)
/* Metrowerks C++ */
# define __STLSOFT_COMPILER_IS_MWERKS
# define STLSOFT_COMPILER_IS_MWERKS
# define STLSOFT_COMPILER_LABEL_STRING          "Metrowerks CodeWarrior C/C++"
# if ((__MWERKS__ & 0xFF00) == 0x2400)
#  define STLSOFT_COMPILER_VERSION_STRING       "Metrowerks CodeWarrior C/C++ 2.4"
# elif ((__MWERKS__ & 0xFF00) == 0x3000)
#  define STLSOFT_COMPILER_VERSION_STRING       "Metrowerks CodeWarrior C/C++ 3.0"
# elif ((__MWERKS__ & 0xFF00) == 0x3200)
#  define STLSOFT_COMPILER_VERSION_STRING       "Metrowerks CodeWarrior C/C++ 3.2"
# else /* ? __MWERKS__ */
#  error Only Metrowerks C++ Compiler 2.4 (CodeWarrior 7), 3.0 (CodeWarrior 8) and 3.2 (CodeWarrior 9) currently supported by the STLSoft libraries
# endif /* __MWERKS__ */

#elif defined(__VECTORC)
/* CodePlay Vector C/C++ */
# define __STLSOFT_COMPILER_IS_VECTORC
# define STLSOFT_COMPILER_IS_VECTORC
# define STLSOFT_COMPILER_LABEL_STRING          "CodePlay VectorC C/C++"
# if (__VECTORC == 1)
#  define STLSOFT_COMPILER_VERSION_STRING       "CodePlay VectorC C/C++"
# else /* ? __VECTORC */
#  error Currently only versions of the CodePlay Vector C/C++ compiler defining __VECTORC == 1 are supported by the STLSoft libraries
# endif /* __VECTORC */

#elif defined(__WATCOMC__)
/* Watcom C/C++ */
# define __STLSOFT_COMPILER_IS_WATCOM
# define STLSOFT_COMPILER_IS_WATCOM
# define STLSOFT_COMPILER_LABEL_STRING          "Watcom C/C++"

# if (__WATCOMC__ == 1100)
#  define STLSOFT_COMPILER_VERSION_STRING       "Watcom C/C++ 11.0"
# elif (__WATCOMC__ == 1200)
#  define STLSOFT_COMPILER_VERSION_STRING       "Open Watcom C/C++ 1.0 (Watcom 12.0)"
# elif (__WATCOMC__ == 1210)
#  define STLSOFT_COMPILER_VERSION_STRING       "Open Watcom C/C++ 1.1 (Watcom 12.1)"
# elif (__WATCOMC__ == 1220)
#  define STLSOFT_COMPILER_VERSION_STRING       "Open Watcom C/C++ 1.2 (Watcom 12.2)"
# elif (__WATCOMC__ == 1230)
#  define STLSOFT_COMPILER_VERSION_STRING     "Open Watcom C/C++ 1.3 (Watcom 12.3)"
# elif (__WATCOMC__ == 1240)
#  define STLSOFT_COMPILER_VERSION_STRING     "Open Watcom C/C++ 1.3 (Watcom 12.4)"
# else /* ? __WATCOMC__ */
#  error Currently only versions 11.0 and 12.0 of the Watcom C/C++ compiler is supported by the STLSoft libraries
# endif /* __WATCOMC__ */

#elif defined(_MSC_VER)
/* Visual C++ */
# define __STLSOFT_COMPILER_IS_MSVC
# define STLSOFT_COMPILER_IS_MSVC
# define STLSOFT_COMPILER_LABEL_STRING          "Visual C++"
# if defined(STLSOFT_FORCE_MSVC_4_2) && (_MSC_VER == 1020)
#  define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ 4.2"
# elif (_MSC_VER == 1100)
#  define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ 5.0"
# elif (_MSC_VER == 1200)
#  define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ 6.0"
# elif (_MSC_VER == 1300)
#  define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ .NET (7.0)"
# elif (_MSC_VER == 1310)
#  define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ .NET (7.1)"
# elif (_MSC_VER == 1400)
#  define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ .NET (8.0)"
# else /* ? _MSC_VER */
#  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
# endif /* _MSC_VER */

#else /* ? compiler */
/* No recognised compiler */
# if defined(_STLSOFT_FORCE_UNKNOWN_COMPILER) || \
     defined(_STLSOFT_FORCE_ANY_COMPILER)
#  define STLSOFT_COMPILER_LABEL_STRING         "Unknown (forced) compiler"
#  define STLSOFT_COMPILER_VERSION_STRING       "Unknown (forced) compiler"
#  define __STLSOFT_COMPILER_IS_UNKNOWN
#  define STLSOFT_COMPILER_IS_UNKNOWN
# else /* ? _STLSOFT_FORCE_UNKNOWN_COMPILER || _STLSOFT_FORCE_ANY_COMPILER */
#  error Compiler is not recognised.
#  error Currently only Borland C++, Comeau C++, Digital Mars C/C++, GNU C/C++,
#  error  Intel C/C++, Metrowerks CodeWarrior, Visual C++ and Watcom C/C++
#  error  compilers are supported by the STLSoft libraries
#  error If you want to use the libraries with your compiler, you may specify the
#  error  _STLSOFT_FORCE_CUSTOM_COMPILER or _STLSOFT_FORCE_ANY_COMPILER pre-processor
#  error  symbols.
#  error _STLSOFT_FORCE_ANY_COMPILER assumes that your compiler can support all
#  error  modern C++ compiler features, and causes the inclusion of the compiler
#  error  features file stlsoft/internal/cccap/unknown.h, which is provided by STLSoft.
#  error _STLSOFT_FORCE_CUSTOM_COMPILER requires that you specify the name of the
#  error  compiler features file in __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME.
#  error The idea is to use _STLSOFT_FORCE_ANY_COMPILER, to determine what language
#  error  features your compiler can support, and then copy, edit and use that file
#  error  via _STLSOFT_FORCE_CUSTOM_COMPILER and __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME.
# endif /* _STLSOFT_FORCE_ANY_COMPILER */

#endif /* compiler tag */

#ifdef STLSOFT_DOCUMENTATION_SKIP_SECTION
/** \def STLSOFT_COMPILER_LABEL_STRING
 * \brief A nul-terminated C-style string denoting the name of the compiler.
 */
# define STLSOFT_COMPILER_LABEL_STRING          "Acme Compiler"
/** \def STLSOFT_COMPILER_VERSION_STRING
 * \brief A nul-terminated C-style string denoting the name and version of the compiler.
 */
# define STLSOFT_COMPILER_VERSION_STRING        "Acme Compiler v1.0"
#else /* ? STLSOFT_DOCUMENTATION_SKIP_SECTION */
# define __STLSOFT_COMPILER_LABEL_STRING        STLSOFT_COMPILER_LABEL_STRING
# define __STLSOFT_COMPILER_VERSION_STRING      STLSOFT_COMPILER_VERSION_STRING
#endif /* STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
 * Compiler language feature support
 *
 * Various compilers support the language differently (or not at all), so these
 * features are discriminated here and utilised by various means within the code
 * in order to minimise the use of the preprocessor conditionals in the other
 * libraries' source code.
 */

#if defined(_STLSOFT_INCLUDE_UNDEFS) || \
    (  defined(STLSOFT_STRICT) && \
       !defined(STLSOFT_NO_UNDEFS))
# include <stlsoft/internal/_undefs.h>
#endif /* _STLSOFT_INCLUDE_UNDEFS) || (STLSOFT_STRICT) && !STLSOFT_NO_UNDEFS) */

/* Now we include the appropriate compiler-specific header */

#if defined(STLSOFT_COMPILER_IS_CUSTOM)
# include __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
#elif defined(STLSOFT_COMPILER_IS_UNKNOWN)
# include <stlsoft/internal/cccap/unknown.h>
#elif defined(STLSOFT_COMPILER_IS_BORLAND)
# include <stlsoft/internal/cccap/borland.h>
#elif defined(STLSOFT_COMPILER_IS_COMO)
# include <stlsoft/internal/cccap/como.h>
#elif defined(STLSOFT_COMPILER_IS_DMC)
# include <stlsoft/internal/cccap/dmc.h>
#elif defined(STLSOFT_COMPILER_IS_GCC)
# include <stlsoft/internal/cccap/gcc.h>
#elif defined(STLSOFT_COMPILER_IS_INTEL)
# include <stlsoft/internal/cccap/intel.h>
#elif defined(STLSOFT_COMPILER_IS_MSVC)
# include <stlsoft/internal/cccap/msvc.h>
#elif defined(STLSOFT_COMPILER_IS_MWERKS)
# include <stlsoft/internal/cccap/mwerks.h>
#elif defined(STLSOFT_COMPILER_IS_VECTORC)
# include <stlsoft/internal/cccap/vectorc.h>
#elif defined(STLSOFT_COMPILER_IS_WATCOM)
# include <stlsoft/internal/cccap/watcom.h>
#else /* ? compiler */
# error Compiler not correctly discriminated
#endif /* compiler */

#if defined(_STLSOFT_COMPILE_VERBOSE) && \
    !defined(STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT)
# undef _STLSOFT_COMPILE_VERBOSE
#endif /* !STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT && _STLSOFT_COMPILE_VERBOSE */

#if defined(STLSOFT_NO_COMPILE_VERBOSE) && \
    defined(_STLSOFT_COMPILE_VERBOSE)
# undef _STLSOFT_COMPILE_VERBOSE
#endif /* STLSOFT_NO_COMPILE_VERBOSE && _STLSOFT_COMPILE_VERBOSE */

#ifdef _STLSOFT_COMPILE_VERBOSE
# pragma message(STLSOFT_COMPILER_VERSION_STRING)
#endif /* STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT */

/* /////////////////////////////////////////////////////////////////////////
 * Sanity checks - 2
 *
 */


/* Template support */
#if defined(__cplusplus) && \
    !defined(STLSOFT_CF_TEMPLATE_SUPPORT)
# error Template support not detected. STLSoft libraries are template-based and require this support.
#endif /* STLSOFT_CF_TEMPLATE_SUPPORT */


/* Native 64-bit integer support */
#if !defined(STLSOFT_CF_64BIT_INT_SUPPORT) && \
    (   defined(STLSOFT_CF_64BIT_INT_IS___int64) || \
        defined(STLSOFT_CF_64BIT_INT_IS_long_long))
# error Definition for 64-bit support is not correct. STLSOFT_CF_64BIT_INT_SUPPORT must be defined for 64-bit support
#endif /* !STLSOFT_CF_64BIT_INT_SUPPORT && (STLSOFT_CF_64BIT_INT_IS___int64 || STLSOFT_CF_64BIT_INT_IS_long_long) */

/* Out-of-class method definition argument full-qualification requirement */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
#  define stlsoft_oom_fn_qual(Q, T)     Q::T
# else /* ? STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED */
#  define stlsoft_oom_fn_qual(Q, T)     T
# endif /* STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* Out-of-memory throws bad_alloc.
 *
 * Discriminated symbol is __STLSOFT_CF_NOTHROW_BAD_ALLOC
 *
 * By default, compilations with the Borland, and Watcom compilers throw
 * bad_alloc in conditions of memory exhaustion, and those with Digital Mars
 * and Microsoft do not.
 *
 * The Microsoft compilers do not throw bad_alloc for long established reasons,
 * though they can be made to do so (see Matthew Wilson, "Generating
 * Out-Of-Memory Exceptions", Windows Developer's Journal, Vol 12 Number 5, May
 * 2001). This feature may be added in a forthcoming release of the libraries.
 *
 * The Digital Mars compiler appears to ship without any header files that
 * define bad_alloc (whether in std or not), so it is therefore assumed that
 * operator new will not throw exceptions in out of memory conditions.
 *
 * Define STLSOFT_CF_THROW_BAD_ALLOC to force Digital Mars/Microsoft to do so.
 * Define __STLSOFT_CF_NOTHROW_BAD_ALLOC to prevent Borland/Comeau/
 * GCC/Metrowerks/Watcom from doing so.
 */

#ifndef STLSOFT_CF_EXCEPTION_SUPPORT
# define __STLSOFT_CF_NOTHROW_BAD_ALLOC
#endif /* !STLSOFT_CF_EXCEPTION_SUPPORT */

#ifdef __STLSOFT_CF_NOTHROW_BAD_ALLOC
# ifdef __STLSOFT_CF_THROW_BAD_ALLOC
#  undef __STLSOFT_CF_THROW_BAD_ALLOC
# endif /* __STLSOFT_CF_THROW_BAD_ALLOC */
#else /* ? __STLSOFT_CF_NOTHROW_BAD_ALLOC */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -