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

📄 _defs.h

📁 realview22.rar
💻 H
📖 第 1 页 / 共 3 页
字号:
/***************************************************************************
 *
 * _defs.h - Common macro definitions to be included by every library file
 *
 * This is an internal header file used to implement the C++ Standard
 * Library. It should never be #included directly by a program.
 *
 * $Id: _defs.h,v 1.7.6.2 2004/11/08 20:00:20 sdouglas Exp $
 *
 ***************************************************************************
 *
 * Copyright (c) 1994-2001 Rogue Wave Software, Inc.  All Rights Reserved.
 *
 * This computer software is owned by Rogue Wave Software, Inc. and is
 * protected by U.S. copyright laws and other laws and by international
 * treaties.  This computer software is furnished by Rogue Wave Software,
 * Inc. pursuant to a written license agreement and may be used, copied,
 * transmitted, and stored only in accordance with the terms of such
 * license and with the inclusion of the above copyright notice.  This
 * computer software or any other copies thereof may not be provided or
 * otherwise made available to any other person.
 *
 * U.S. Government Restricted Rights.  This computer software is provided
 * with Restricted Rights.  Use, duplication, or disclosure by the
 * Government is subject to restrictions as set forth in subparagraph (c)
 * (1) (ii) of The Rights in Technical Data and Computer Software clause
 * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the
 * Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19,
 * as applicable.  Manufacturer is Rogue Wave Software, Inc., 5500
 * Flatiron Parkway, Boulder, Colorado 80301 USA.
 *
 **************************************************************************/

#ifndef _RWSTD_DEFS_H_INCLUDED
#define _RWSTD_DEFS_H_INCLUDED

#include <rw/_config.h>


// provide definitions for C++ versions of standard C headers
// if a header is not available its name is #defined to the name of
// this file (it's harmless and avoids polluting code with
// tons of ugly platform-specific #ifdefs)
#ifndef _RWSTD_NO_NEW_HEADER

#  define _RWSTD_CASSERT   <cassert>
#  define _RWSTD_CCTYPE    <cctype>
#  define _RWSTD_CERRNO    <cerrno>
#  define _RWSTD_CFLOAT    <cfloat>
#  define _RWSTD_CISO646   <ciso646>
#  define _RWSTD_CLIMITS   <climits>
#  define _RWSTD_CLOCALE   <clocale>
#  define _RWSTD_CMATH     <cmath>
#  define _RWSTD_CSETJMP   <csetjmp>
#  define _RWSTD_CSIGNAL   <csignal>
#  define _RWSTD_CSTDARG   <cstdarg>
#  define _RWSTD_CSTDDEF   <cstddef>
#  define _RWSTD_CSTDIO    <cstdio>
#  define _RWSTD_CSTDLIB   <cstdlib>
#  define _RWSTD_CSTRING   <cstring>
#  define _RWSTD_CTIME     <ctime>

#  ifndef _RWSTD_NO_WCHAR_H
#    define _RWSTD_CWCHAR  <cwchar>
#  else
#    define _RWSTD_CWCHAR  <rw/_defs.h>
#  endif   // _RWSTD_NO_WCHAR_H

#  ifndef _RWSTD_NO_WCTYPE_H
#    define _RWSTD_CWCTYPE <cwctype>
#  else
#    define _RWSTD_CWCTYPE <rw/_defs.h>
#  endif   // _RWSTD_NO_WCTYPE_H

#else   // if defined (_RWSTD_NO_NEW_HEADER)

#  define _RWSTD_CASSERT   <assert.h>
#  define _RWSTD_CCTYPE    <ctype.h>
#  define _RWSTD_CERRNO    <errno.h>
#  define _RWSTD_CFLOAT    <float.h>
#  define _RWSTD_CISO646   <iso646.h>
#  define _RWSTD_CLIMITS   <limits.h>
#  define _RWSTD_CLOCALE   <locale.h>
#  define _RWSTD_CMATH     <math.h>
#  define _RWSTD_CSETJMP   <setjmp.h>
#  define _RWSTD_CSIGNAL   <signal.h>
#  define _RWSTD_CSTDARG   <stdarg.h>
#  define _RWSTD_CSTDDEF   <stddef.h>
#  define _RWSTD_CSTDIO    <stdio.h>
#  define _RWSTD_CSTDLIB   <stdlib.h>
#  define _RWSTD_CSTRING   <string.h>
#  define _RWSTD_CTIME     <time.h>

#  ifndef _RWSTD_NO_WCHAR_H
#    define _RWSTD_CWCHAR  <wchar.h>
#  else
#    define _RWSTD_CWCHAR  <rw/_defs.h>
#  endif   // _RWSTD_NO_WCHAR_H

#  ifndef _RWSTD_NO_WCTYPE_H
#    define _RWSTD_CWCTYPE <wctype.h>
#  else
#    define _RWSTD_CWCTYPE <rw/_defs.h>
#  endif   // _RWSTD_NO_WCTYPE_H

#endif   // _RWSTD_NO_NEW_HEADER


#if defined(_WIN64)
#  define _RWSTD_SYS_TYPES_H <basetsd.h>
#elif defined(_WIN32)
#  define _RWSTD_SYS_TYPES_H <rw/_defs.h>
#else
#  define _RWSTD_SYS_TYPES_H <sys/types.h>
#endif   // _WIN32


#ifdef _RWSTD_REQUIRES_IEEEFP
// non-standard file required on Some platforms (e.g., Siemens) for <limits>
#  define _RWSTD_IEEEFP <ieeefp.h>
#else
#  define _RWSTD_IEEEFP <rw/_defs.h>
#endif


// provide default #definitions of ANSI C library headers
#if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
#  define _RWSTD_ANSI_C_ASSERT_H "/usr/include/assert.h"
#endif
#if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
#  define _RWSTD_ANSI_C_CTYPE_H "/usr/include/ctype.h"
#endif
#if !defined (_RWSTD_NO_ERRNO_H) && !defined (_RWSTD_ANSI_C_ERRNO_H)
#  define _RWSTD_ANSI_C_ERRNO_H "/usr/include/errno.h"
#endif
#if !defined (_RWSTD_NO_FLOAT_H) && !defined (_RWSTD_ANSI_C_FLOAT_H)
#  define _RWSTD_ANSI_C_FLOAT_H "/usr/include/float.h"
#endif
#if !defined (_RWSTD_NO_ISO646_H) && !defined (_RWSTD_ANSI_C_ISO646_H)
#  define _RWSTD_ANSI_C_ISO646_H "/usr/include/iso646.h"
#endif
#if !defined (_RWSTD_NO_LIMITS_H) && !defined (_RWSTD_ANSI_C_LIMITS_H)
#  define _RWSTD_ANSI_C_LIMITS_H "/usr/include/limits.h"
#endif
#if !defined (_RWSTD_NO_LOCALE_H) && !defined (_RWSTD_ANSI_C_LOCALE_H)
#  define _RWSTD_ANSI_C_LOCALE_H "/usr/include/locale.h"
#endif
#if !defined (_RWSTD_NO_MATH_H) && !defined (_RWSTD_ANSI_C_MATH_H)
#  define _RWSTD_ANSI_C_MATH_H "/usr/include/math.h"
#endif
#if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
#  define _RWSTD_ANSI_C_SETJMP_H "/usr/include/setjmp.h"
#endif
#if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
#  define _RWSTD_ANSI_C_SIGNAL_H "/usr/include/signal.h"
#endif
#if !defined (_RWSTD_NO_STDARG_H) && !defined (_RWSTD_ANSI_C_STDARG_H)
#  define _RWSTD_ANSI_C_STDARG_H "/usr/include/stdarg.h"
#endif
#if !defined (_RWSTD_NO_STDDEF_H) && !defined (_RWSTD_ANSI_C_STDDEF_H)
#  define _RWSTD_ANSI_C_STDDEF_H "/usr/include/stddef.h"
#endif
#if !defined (_RWSTD_NO_STDIO_H) && !defined (_RWSTD_ANSI_C_STDIO_H)
#  define _RWSTD_ANSI_C_STDIO_H "/usr/include/stdio.h"
#endif
#if !defined (_RWSTD_NO_STDLIB_H) && !defined (_RWSTD_ANSI_C_STDLIB_H)
#  define _RWSTD_ANSI_C_STDLIB_H "/usr/include/stdlib.h"
#endif
#if !defined (_RWSTD_NO_STRING_H) && !defined (_RWSTD_ANSI_C_STRING_H)
#  define _RWSTD_ANSI_C_STRING_H "/usr/include/string.h"
#endif
#if !defined (_RWSTD_NO_TIME_H) && !defined (_RWSTD_ANSI_C_TIME_H)
#  define _RWSTD_ANSI_C_TIME_H "/usr/include/time.h"
#endif
#if !defined (_RWSTD_NO_WCHAR_H) && !defined (_RWSTD_ANSI_C_WCHAR_H)
#  define _RWSTD_ANSI_C_WCHAR_H "/usr/include/wchar.h"
#endif
#if !defined (_RWSTD_NO_WCTYPE_H) && !defined (_RWSTD_ANSI_C_WCTYPE_H)
#  define _RWSTD_ANSI_C_WCTYPE_H "/usr/include/wctype.h"
#endif


// Macro for determining the number of bits in a word.
// Used by vector<bool>.
//
#define _RWSTD_WORD_BIT (int(CHAR_BIT*sizeof(unsigned int)))


//
// These macros tune the speed vs. space optimization of container
// performance with regard to allocation of memory. These have been tuned
// with speed efficiency as a primary conern. Space efficiency was
// considered, but was secondary. (refer to Onyx QA Entry #4920)
//
// The ratio parameter must be above one for an amortized constant time
// algorithm.  Lowering the ratio will lower rapidity and improve space
// efficiency. This effect will be most noticable when working with
// containers of few elements (few being less than 32 for the general case)
// If your use case is with containers that typically have many elements
// lowering the ratio will have less effect on rapidity.
//
// The minimum elements parameter refers to minimum amount of additional
// capcity requested (in number of elements) when more memory is needed.
// Rapidity with containers of few elements will be affected most noticably
// as this amount this is lowered.
//
// For strings, the specializations on char and wchar_t were seen as an
// exploitable common case, and have their own more specialized template
// function overloads in the string header.  These are tweakable here
// with the STRING version of these macros.
//
#if !defined(_RWSTD_MINIMUM_NEW_CAPACITY)
#  define _RWSTD_MINIMUM_NEW_CAPACITY _RWSTD_C::size_t (32)
#endif
#if !defined(_RWSTD_NEW_CAPACITY_RATIO)
   // using long doubles to eliminate bogus warnings on g++ 2.95.2/sparc
   // (-W -O2/3 only): warning: overflow on truncation to integer
   //#  define _RWSTD_NEW_CAPACITY_RATIO 1.618L
#  define _RWSTD_INCREASE_CAPACITY(x) ((x) + ((x) >> 1) + ((x) >> 3)) // 'x * 1.625'
#endif
#if !defined(_RWSTD_MINIMUM_STRING_CAPACITY)
#  define _RWSTD_MINIMUM_STRING_CAPACITY _RWSTD_C::size_t (128)
#endif
#if !defined(_RWSTD_STRING_CAPACITY_RATIO)
   //#  define _RWSTD_STRING_CAPACITY_RATIO 1.618L
#  define _RWSTD_INCREASE_STRING_CAPACITY(x) _RWSTD_INCREASE_CAPACITY(x)
#endif


// set up Win32/64 DLL export/import directives
// _DLL - defined by the compiler when either -MD or -MDd is used
// RWDLL - defined for all Rogue Wave products to be built as shared libs
// _RWSHARED - defined for stdlib to be built/used as a shared lib
#if    (defined (_WIN32) || defined (_WIN64)) \
    && (defined (RWDLL) || defined (_RWSHARED))
#  ifdef _RWBUILD_std
     // building a shared lib, export names
#    define _RWSTD_EXPORT   __declspec (dllexport)
#  else
     // using a shared lib, import names
#    define _RWSTD_EXPORT   __declspec (dllimport)
#  endif

   // disable warnings:
   // C4251: class needs to have dll-interface to be used by cliens
   // C4275: non dll-interface class used as base for dll-interface class
#  pragma warning (disable: 4251)
#  pragma warning (disable: 4275)
#else
// disable Windows hacks
#  define _RWSTD_EXPORT
#endif


// The member variable string::npos is required to be static to allow its
// use in constant expressions.  For compilers that do not support static
// intialization an enumeration is used.  This workaround is not available
// on LLP64 architectures however, where enums are 32 bit.  In this case it
// we don't have a workaround to support the use of npos in constant
// expressions, the macro _RWSTD_NPOS must be used instead
#if defined(_RWSTD_LLP64_ARCHITECTURE) && defined(_RWSTD_NO_STATIC_CONST_MEMBER_INIT)
#  define _RWSTD_NPOS _RWSTD_C::size_t(-1)
#else
#  define _RWSTD_NPOS string::npos
#endif


/*
** Miscellaneous workarounds.
*/

#ifdef _RWSTD_NO_BOOL
#  ifdef _RWSTD_MSVC_BOOL_WARNING
#    pragma warning ( disable : 4237 )
#  endif

   typedef int     bool;

#  ifndef true
#    define true    1
#  endif

#  ifndef false
#    define false   0
#  endif
#endif // _RWSTD_NO_BOOL


#ifndef _RWSTD_NO_TYPENAME
#  define _TYPENAME typename
#else
#  define _TYPENAME
#endif

#if defined (SNI) || defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x520
#  define _TYPENAME_CTOR
#else
#  define _TYPENAME_CTOR _TYPENAME
#endif

#ifndef _RWSTD_NO_EXPLICIT
#  define _EXPLICIT explicit
#else
#  define _EXPLICIT
#endif


#ifndef _RWSTD_NO_MUTABLE
#  define _MUTABLE mutable
#else
#  define _MUTABLE
#endif


//
// Macro for forming or omitting default template arguments in constructors
//

#ifndef _RWSTD_NO_DEFAULT_TEMPLATE_ARGS
#  define _RWSTD_DEFAULT_ARG(n) = n
#else
#  define _RWSTD_DEFAULT_ARG(n)
#endif


// MSVC version 12.00.xxxx (and perhaps prior) can't parse template
// re-declarations if the previous declaration contains two or more
// default template parameters (go figure)
#if defined (_MSC_VER) && _MSC_VER <= 1300
#  define _RWSTD_REDECLARED_DEFAULT(arg)   = arg
#else   // if !(!defined (_MSC_VER) || (_MSC_VER <= 1300))
#  define _RWSTD_REDECLARED_DEFAULT(ignore)
#endif   // !defined (_MSC_VER) || (_MSC_VER <= 1300)


//
// Macro for forming or ommitting default template parameters.
//
#ifndef _RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES
#  define _RWSTD_SIMPLE_DEFAULT(a)  = a
#  ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES
#    define _RWSTD_COMPLEX_DEFAULT(a)  = a
#  else
#    define _RWSTD_COMPLEX_DEFAULT(a)
#  endif
#else   // if defined (_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES)

⌨️ 快捷键说明

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