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

📄 msvc.h

📁 新版本TR1的stl
💻 H
📖 第 1 页 / 共 2 页
字号:
/* /////////////////////////////////////////////////////////////////////////
 * File:        stlsoft/internal/cccap/msvc.h
 *
 * Purpose:     Compiler feature discrimination for Visual C++.
 *
 * Created:     7th February 2003
 * Updated:     4th August 2007
 *
 * Home:        http://stlsoft.org/
 *
 * Copyright (c) 2003-2007, 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++
 * (\ref group__library__internal).
 */

#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     14
# define STLSOFT_VER_H_STLSOFT_CCCAP_MSVC_REVISION  1
# define STLSOFT_VER_H_STLSOFT_CCCAP_MSVC_EDIT      95
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

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

/*
[<[STLSOFT-AUTO:NO-DOCFILELABEL]>]
[<[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 */

/* Variadic Macros
 */

#if _MSC_VER >= 1400
# define STLSOFT_CF_SUPPORTS_VARIADIC_MACROS
#endif /* _MSC_VER */

/* Types:
 */

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

/* char (sign) */
#ifdef _CHAR_UNSIGNED
# define STLSOFT_CF_CHAR_IS_UNSIGNED
#endif /* _CHAR_UNSIGNED */

/* 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_NATIVE_WCHAR_T            __wchar_t */
# elif defined(_WCHAR_T_DEFINED)
#  define STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
# else
  /* Not defined */
#  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
# else
  /* Not defined */
# endif /* _WCHAR_T_DEFINED */
#endif /* _MSC_VER */

/* /////////////////////////////////////////////////////////////////////////
 * Integral types
 *
 * The purpose of this section is to define the following types:
 *
 *  - 8-bit signed and unsigned integers
 *  - 16-bit signed and unsigned integers
 *  - 32-bit signed and unsigned integers
 *  - (optionally) 64-bit signed and unsigned integers
 *
 * and to define, where appropriate the following symbols (used for
 * overloading):
 *
 *  - STLSOFT_CF_CHAR_DISTINCT_INT_TYPE
 *  - STLSOFT_CF_SHORT_DISTINCT_INT_TYPE
 *  - STLSOFT_CF_INT_DISTINCT_INT_TYPE
 *  - STLSOFT_CF_LONG_DISTINCT_INT_TYPE
 *  - STLSOFT_CF_LONG_LONG_DISTINCT_INT_TYPE
 *
 * which indicate that a given type is not used in the size-specific types.
 */

/* 8-bit integer */
#define STLSOFT_CF_8BIT_INT_SUPPORT
#if _MSC_VER >= 1020
# define STLSOFT_SI08_T_BASE_TYPE   signed      __int8
# define STLSOFT_UI08_T_BASE_TYPE   unsigned    __int8
# if _MSC_VER == 1200
#  define STLSOFT_CF_CHAR_DISTINCT_INT_TYPE
# endif /* _MSC_VER */
#else /* ? _MSC_VER */
# define STLSOFT_SI08_T_BASE_TYPE   signed      char
# define STLSOFT_UI08_T_BASE_TYPE   unsigned    char
#endif /* _MSC_VER >= 1020 */

/* 16-bit integer */
#define STLSOFT_CF_16BIT_INT_SUPPORT
#if _MSC_VER >= 1020
# define STLSOFT_SI16_T_BASE_TYPE   signed      __int16
# define STLSOFT_UI16_T_BASE_TYPE   unsigned    __int16
# if _MSC_VER == 1200
#  define STLSOFT_CF_SHORT_DISTINCT_INT_TYPE
# endif /* _MSC_VER */
#else /* ? _MSC_VER */
# define STLSOFT_SI16_T_BASE_TYPE   signed      short
# define STLSOFT_UI16_T_BASE_TYPE   unsigned    short
#endif /* _MSC_VER >= 1020 */

/* 32-bit integer */
#define STLSOFT_CF_32BIT_INT_SUPPORT
#if _MSC_VER >= 1020
# define STLSOFT_SI32_T_BASE_TYPE   signed      __int32
# define STLSOFT_UI32_T_BASE_TYPE   unsigned    __int32
# if _MSC_VER == 1200
#  define STLSOFT_CF_INT_DISTINCT_INT_TYPE
# endif /* _MSC_VER */
# define STLSOFT_CF_LONG_DISTINCT_INT_TYPE
#else /* ? _MSC_VER */
# define STLSOFT_SI32_T_BASE_TYPE   signed      long
# define STLSOFT_UI32_T_BASE_TYPE   unsigned    long
# define STLSOFT_CF_INT_DISTINCT_INT_TYPE
#endif /* _MSC_VER */

/* 64-bit integer */
#if _MSC_VER >= 1020
# define STLSOFT_CF_64BIT_INT_SUPPORT
# define STLSOFT_CF_64BIT_INT_IS___int64
# define STLSOFT_SI64_T_BASE_TYPE   signed      __int64
# define STLSOFT_UI64_T_BASE_TYPE   unsigned    __int64
#endif /* _MSC_VER >= 1020 */


/* 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_RELEASE_OPTIMISATION_SUPPORT */

/* Exception support */
#ifdef _CPPUNWIND
# 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
#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
#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

#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
# endif /* _CPPUNWIND */
#endif /* _MSC_VER */

/* #define STLSOFT_CF_EXCEPTION_SPEC_EXPENSIVE */

#if _MSC_VER >= 1300
# 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
#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
#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
#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
#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

⌨️ 快捷键说明

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