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

📄 msvc.h

📁 用STL的方式封装了WindowsAPI、COM调用、ACE、ATL、MFC、WTL等多种组件
💻 H
📖 第 1 页 / 共 2 页
字号:
/* /////////////////////////////////////////////////////////////////////////
 * File:        stlsoft/internal/cccap/msvc.h
 *
 * Purpose:     Compiler feature discrimination for Visual C++.
 *
 * Created:     7th February 2003
 * Updated:     10th June 2006
 *
 * Home:        http://stlsoft.org/
 *
 * Copyright (c) 2003-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
# error This file must not be included independently of stlsoft/stlsoft.h
#endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */

/// \file stlsoft/internal/cccap/msvc.h
///
/// Compiler feature discrimination for Visual C++.

#ifdef STLSOFT_INCL_H_STLSOFT_CCCAP_MSVC
# error This file cannot be included more than once in any compilation unit
#endif /* STLSOFT_INCL_H_STLSOFT_CCCAP_MSVC */

#ifndef STLSOFT_COMPILER_IS_MSVC
# error This file has been erroneously included for a compiler other than Visual C++
#endif /* compiler */

/* ////////////////////////////////////////////////////////////////////// */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_H_STLSOFT_CCCAP_MSVC_MAJOR     3
# define STLSOFT_VER_H_STLSOFT_CCCAP_MSVC_MINOR     8
# define STLSOFT_VER_H_STLSOFT_CCCAP_MSVC_REVISION  1
# define STLSOFT_VER_H_STLSOFT_CCCAP_MSVC_EDIT      82
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
 * Auto-generation and compatibility
 */

/*
[<[STLSOFT-AUTO:NO-UNITTEST]>]
*/

/* /////////////////////////////////////////////////////////////////////////
 * Compiler features
 */

/* Messaging
 */

#define STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT

/* Support for #pragma once
 */

#if _MSC_VER >= 900
# define STLSOFT_CF_PRAGMA_ONCE_SUPPORT
#endif /* _MSC_VER */

/* Types:
 */

/* bool */
#ifdef __BOOL_DEFINED
# define __STLSOFT_CF_NATIVE_BOOL_SUPPORT
# define STLSOFT_CF_NATIVE_BOOL_SUPPORT
#else
 /* Not defined */
#endif /* __BOOL_DEFINED */

/* wchar_t */
#if _MSC_VER >= 1300
 /* Even though VC 7.0 and 7.1 provide a native wchar_t type, that is __wchar_t,
  * it is not compatible with their libraries (which use the typedef wchar_t),
  * so we cannot use it.
  *
  * wchar_t itself may be used, when _NATIVE_WCHAR_T_DEFINED is defined
  */
# ifdef _NATIVE_WCHAR_T_DEFINED
#  define __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
#  define STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
/* #  define STLSOFT_NATIVE_WCHAR_T            __wchar_t */
# elif defined(_WCHAR_T_DEFINED)
#  define __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
#  define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
# else
  /* Not defined */
#  define __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
#  define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
# endif /* _WCHAR_T_DEFINED */
#else
 /* Previous versions do not have a native type, but do have the typedef wchar_t
  * when _WCHAR_T_DEFINED is defined
  */
# if defined(_WCHAR_T_DEFINED)
#  define __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
#  define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
# else
  /* Not defined */
# endif /* _WCHAR_T_DEFINED */
#endif /* _MSC_VER */

/* Integral types
 *
 * The integral types may be provided, for a given compiler, by standard types,
 * or by extended types, or both.
 */

/* 8-bit integer */
#define STLSOFT_CF_8BIT_INT_SUPPORT
#if _MSC_VER >= 1020
# define STLSOFT_CF_8BIT_INT_IS_EXTENDED_TYPE
# define STLSOFT_CF_EXTENDED_INT8_T              __int8
# define STLSOFT_CF_EXTENDED_SINT8_T      signed __int8
# define STLSOFT_CF_EXTENDED_UINT8_T    unsigned __int8
# if _MSC_VER == 1200
#  define STLSOFT_CF_8BIT_INT_EXTENDED_TYPE_IS_DISTINCT
# endif /* _MSC_VER */
#endif /* _MSC_VER >= 1020 */
#define STLSOFT_CF_STANDART_INT8_IS_char
#define STLSOFT_CF_STANDARD_INT8_T               char
#define STLSOFT_CF_STANDARD_SINT8_T       signed char
#define STLSOFT_CF_STANDARD_UINT8_T     unsigned char

/* 16-bit integer */
#define STLSOFT_CF_16BIT_INT_SUPPORT
#if _MSC_VER >= 1020
# define STLSOFT_CF_16BIT_INT_IS_EXTENDED_TYPE
# define STLSOFT_CF_EXTENDED_INT16_T            __int16
# define STLSOFT_CF_EXTENDED_SINT16_T    signed __int16
# define STLSOFT_CF_EXTENDED_UINT16_T  unsigned __int16
# if _MSC_VER == 1200
#  define STLSOFT_CF_16BIT_INT_EXTENDED_TYPE_IS_DISTINCT
# endif /* _MSC_VER */
#endif /* _MSC_VER >= 1020 */
#define STLSOFT_CF_STANDARD_INT16_IS_short
#define STLSOFT_CF_STANDARD_INT16_T             short
#define STLSOFT_CF_STANDARD_SINT16_T     signed short
#define STLSOFT_CF_STANDARD_UINT16_T   unsigned short

/* 32-bit integer */
#define STLSOFT_CF_32BIT_INT_SUPPORT
#if _MSC_VER >= 1020
# define STLSOFT_CF_32BIT_INT_IS_EXTENDED_TYPE
# define STLSOFT_CF_EXTENDED_INT32_T            __int32
# define STLSOFT_CF_EXTENDED_SINT32_T    signed __int32
# define STLSOFT_CF_EXTENDED_UINT32_T  unsigned __int32
# if _MSC_VER == 1200
#  define STLSOFT_CF_32BIT_INT_EXTENDED_TYPE_IS_DISTINCT
# endif /* _MSC_VER */
#endif /* _MSC_VER >= 1020 */
#define STLSOFT_CF_STANDARD_INT32_IS_long
#define STLSOFT_CF_STANDARD_INT32_T             long
#define STLSOFT_CF_STANDARD_SINT32_T     signed long
#define STLSOFT_CF_STANDARD_UINT32_T   unsigned long

/* 64-bit integer */
#if _MSC_VER >= 1020
# define STLSOFT_CF_64BIT_INT_SUPPORT
# define STLSOFT_CF_64BIT_INT_IS_EXTENDED_TYPE
# define STLSOFT_CF_64BIT_INT_IS___int64
# define STLSOFT_CF_EXTENDED_INT64_T            __int64
# define STLSOFT_CF_EXTENDED_SINT64_T    signed __int64
# define STLSOFT_CF_EXTENDED_UINT64_T  unsigned __int64
#endif /* _MSC_VER >= 1020 */

/* Are integers a unique type (i.e. not int8/16/32/64)? */
#if _MSC_VER == 1200
# define __STLSOFT_CF_INT_DISTINCT_TYPE
# define STLSOFT_CF_INT_DISTINCT_TYPE
#endif /* _MSC_VER */


/* Member constants */
#if _MSC_VER >= 1300
# define STLSOFT_CF_MEMBER_CONSTANT_SUPPORT
#endif /* _MSC_VER > 1300 */

/* Static assertions */
#define __STLSOFT_CF_STATIC_ASSERT_SUPPORT
#define STLSOFT_CF_STATIC_ASSERT_SUPPORT

#define __STLSOFT_CF_STATIC_ASSERT_RELEASE_OPTIMISATION_SUPPORT

/* Exception support */
#ifdef _CPPUNWIND
# define __STLSOFT_CF_EXCEPTION_SUPPORT
# define STLSOFT_CF_EXCEPTION_SUPPORT
#else /* ? _CPPUNWIND */
 /* Not defined */
#endif /* _CPPUNWIND */

/*  */
#if _MSC_VER >= 1100 && \
    _MSC_VER < 1310
# define __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
# define STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
#endif /* _MSC_VER */

/* Namespace support */
#if _MSC_VER < 1100
 /* Since Visual C++ 4.2 and earlier do not correctly support using declarations
  * when applied to templates, it makes the use of namespaces with templates
  * too painful to use, so namespaces are suppressed.
  */
# define _STLSOFT_NO_NAMESPACES
#endif /* _MSC_VER < 1100 */

#if _MSC_VER >= 1020
# define __STLSOFT_CF_NAMESPACE_SUPPORT
# define STLSOFT_CF_NAMESPACE_SUPPORT
#endif /* _MSC_VER >= 1020 */

#define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT

#if _MSC_VER >= 1300
# define STLSOFT_CF_COMPILER_SUPPORTS_RETURN_VOID
#endif /* _MSC_VER >= 1300 */

/* Template support */
#define __STLSOFT_CF_TEMPLATE_SUPPORT
#define STLSOFT_CF_TEMPLATE_SUPPORT

#if _MSC_VER < 1100
# define STLSOFT_CF_TEMPLATE_TYPE_REQUIRED_IN_ARGS
#endif /* _MSC_VER */

#if _MSC_VER >= 1100
# ifdef _CPPUNWIND
#  define __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
#  define STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
# endif /* _CPPUNWIND */
#endif /* _MSC_VER */

//#define STLSOFT_CF_EXCEPTION_SPEC_EXPENSIVE

#if _MSC_VER >= 1300
# define __STLSOFT_CF_THROW_BAD_ALLOC
# define STLSOFT_CF_THROW_BAD_ALLOC
#else
 /* Not defined */
#endif /* _MSC_VER */

#if _MSC_VER >= 1100
# define __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
# define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
#else
 /* Not defined */
#endif /* _MSC_VER */

/* Although VC++ 5.0 does work with this in isolated cases, in practice it experiences
 * too many internal compiler errors, or compiler lock-ups, to make it tolerable
 */
#if _MSC_VER >= 1100
# define __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
# define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
#else
 /* Not defined */
#endif /* _MSC_VER */

#if _MSC_VER >= 1310
# define STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
#else
 /* Not defined */
#endif /* _MSC_VER */

#if _MSC_VER >= 1100
# define __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
# define STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
#else
  /* Not defined */
#endif /* _MSC_VER */

#if _MSC_VER >= 1300
# define STLSOFT_CF_MEMBER_TEMPLATE_OVERLOAD_DISCRIMINATED
#endif /* _MSC_VER */

/* Although VC++ 5.0 does work with this in isolated cases, in practice it experiences
 * too many internal compiler errors, or compiler lock-ups, to make it tolerable
 */
#if _MSC_VER > 1100
# define __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
# define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
#else
  /* Not defined */
#endif /* _MSC_VER */

/* This caters for the case where a copy constructor and a template copy constructor -
 * as in the case of an allocator class template - may not overload.
 */
#if _MSC_VER < 1300
# define STLSOFT_CF_NO_COPY_CTOR_AND_COPY_CTOR_TEMPLATE_OVERLOAD
#else
  /* Not defined */
#endif /* _MSC_VER */

#if _MSC_VER >= 1310
# define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_OVERLOAD_DISCRIMINATED
#endif /* _MSC_VER */

#if _MSC_VER >= 1200
# define __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
# define STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
#else

⌨️ 快捷键说明

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