features.h
来自「symbian 上的stl_port进过编译的。」· C头文件 代码 · 共 1,195 行 · 第 1/3 页
H
1,195 行
#ifndef _STLP_MPWFIX_TRY# define _STLP_MPWFIX_TRY#endif#ifndef _STLP_MPWFIX_CATCH# define _STLP_MPWFIX_CATCH#endif#ifndef _STLP_MPWFIX_CATCH_ACTION# define _STLP_MPWFIX_CATCH_ACTION(action)#endif/* if _STLP_DEBUG or _STLP_ASSERTIONS are set, stl/debug/_debug.h defines those */#if !defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_ALLOC)# define _STLP_ASSERT(expr)#endif#if !defined (_STLP_DEBUG)# define _STLP_VERBOSE_ASSERT(expr,diagnostic)# define _STLP_DEBUG_CHECK(expr)# define _STLP_DEBUG_DO(expr)#endif#if !defined (_STLP_WEAK)# define _STLP_WEAK#endif/* default parameters as template types derived from arguments ( not always supported ) */#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname#else# if !defined (_STLP_DEFAULT_TYPE_PARAM)# define _STLP_DEFAULT_TYPE_PARAM 1# endif# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval#endif/* default parameters as complete types */#if defined (_STLP_DEFAULT_TYPE_PARAM)# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val#else# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name#endif/* SGI compatibility */#ifdef _STLP_NO_WCHAR_T# ifndef _STLP_NO_NATIVE_WIDE_STREAMS# define _STLP_NO_NATIVE_WIDE_STREAMS 1# endif#else# define _STLP_HAS_WCHAR_T 1#endif#if !defined (_STLP_NO_AT_MEMBER_FUNCTION)# define _STLP_CAN_THROW_RANGE_ERRORS 1#endif#if !defined (_STLP_USE_RAW_SGI_ALLOCATORS)# define _STLP_DEFAULT_ALLOCATOR(_Tp) allocator< _Tp ># define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >)# define _STLP_DEFAULT_PAIR_ALLOCATOR(_Key, _Tp) allocator< pair < _Key, _Tp > ># if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc# define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1# else# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \ class _Alloc = allocator< pair < _Key, _Tp > ># endif#else# define _STLP_DEFAULT_ALLOCATOR( _Tp ) __sgi_alloc# define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc)# define _STLP_DEFAULT_PAIR_ALLOCATOR( _Key, _Tp ) __sgi_alloc# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc)# if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) && !defined (_STLP_DEFAULT_TYPE_PARAM)# define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1# endif#endif/* debug mode tool */#if defined (_STLP_DEBUG)# define _STLP_NON_DBG_NAME(X) _NonDbg_##X#endif/* pointer specialization tool */#if defined (_STLP_USE_PTR_SPECIALIZATIONS)# define _STLP_PTR_IMPL_NAME(X) _Impl_##X#endif#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)# define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X# if defined (_STLP_DEBUG)# define _STLP_NON_DBG_NO_MEM_T_NAME(X) _NonDbg_NoMemT_##X# endif#endif/* this always mean the C library is in global namespace */#if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD)# define _STLP_VENDOR_GLOBAL_CSTD 1#endif/* Depending of whether compiler supports namespaces, * tune the parameters for vendor-supplied libraries. * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES, * since it depends only on the native features, not on user's preference whether * to use namespace for STLport or not. */#if !defined (_STLP_HAS_NO_NAMESPACES)/* Import some vendor's headers into corresponding STLport ones if they might be needed * (if we wrap native iostreams and use namepace other than std::) */# if defined (_STLP_WHOLE_NATIVE_STD)# define _STLP_IMPORT_VENDOR_STD 1# undef _STLP_MINIMUM_IMPORT_STD# endif/* if using stlport:: namespace or if C library stuff is not in vendor's std::, * try importing 'em. * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */# if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD))# define _STLP_IMPORT_VENDOR_CSTD 1# endif# if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS)# define _STLP_NO_CSTD_FUNCTION_IMPORTS# endif# define _STLP_USING_NAMESPACE(x) using namespace x ;namespace std { }namespace __std_alias = std;/* assume std:: namespace for C++ std library if not being told otherwise */# if defined (_STLP_VENDOR_GLOBAL_STD)# define _STLP_VENDOR_STD# else# define _STLP_VENDOR_STD __std_alias# endif/* tune things that come from C library */# if defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS)/* in old-style headers, C functions go to global scope. */# define _STLP_VENDOR_CSTD# define _STLP_USING_VENDOR_CSTD# else# define _STLP_VENDOR_CSTD _STLP_VENDOR_STD# define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD)# endif /* _STLP_VENDOR_CSTD *//* exception, typeinfo, new - always come from the vendor */# if !defined (_STLP_VENDOR_EXCEPT_STD)# if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD)# define _STLP_VENDOR_EXCEPT_STD# else# define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD# endif# endif# define _STLP_OLD_IO_NAMESPACE# if !defined (_STLP_VENDOR_MB_NAMESPACE)# define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD# endif#else/* compiler has no namespace support */# define _STLP_VENDOR_STD# define _STLP_VENDOR_CSTD# define _STLP_USING_NAMESPACE(x)# define _STLP_USING_VENDOR_CSTD# define _STLP_VENDOR_EXCEPT_STD#endif#if defined (_STLP_USE_NAMESPACES)# if defined (_STLP_USE_OWN_NAMESPACE)# if !defined (_STLP_STD_NAME)# if !defined (_STLP_DEBUG)# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)# ifndef _STLP_THREADS# define _STLP_STD_NAME stlpmtx_std# else# define _STLP_STD_NAME stlp_std# endif# else# ifndef _STLP_THREADS# define _STLP_STD_NAME stlpxmtx_std# else# define _STLP_STD_NAME stlpx_std# endif# endif# else/* * The STLport debug mode is binary incompatible with the other modes, * lets make it clear on the STLport namespace to generate link errors rather * than runtime. */# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)# ifndef _STLP_THREADS# define _STLP_STD_NAME stlpdmtx_std# else# define _STLP_STD_NAME stlpd_std# endif# else# ifndef _STLP_THREADS# define _STLP_STD_NAME stlpdxmtx_std# else# define _STLP_STD_NAME stlpdx_std# endif# endif# endif# endifnamespace _STLP_STD_NAME { }# else# if defined (_STLP_DEBUG)namespace stdD = std;# endif# define _STLP_STD_NAME std# endif /* _STLP_USE_OWN_NAMESPACE */# if !defined (_STLP_USING_NAMESPACE_BUG)# define _STLP_PRIV_NAME stlp_privnamespace _STLP_PRIV_NAME { using namespace _STLP_STD_NAME;}# else# define _STLP_PRIV_NAME priv# endif# define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME {# define _STLP_END_NAMESPACE }# if !defined (_STLP_DONT_USE_PRIV_NAMESPACE)# if !defined (_STLP_USING_NAMESPACE_BUG)/* We prefer to make private namespace a totaly seperated namespace... */# define _STLP_PRIV ::_STLP_PRIV_NAME::# define _STLP_MOVE_TO_PRIV_NAMESPACE } namespace _STLP_PRIV_NAME {# define _STLP_MOVE_TO_STD_NAMESPACE } namespace _STLP_STD_NAME {# else/* but sometimes we can't: */# define _STLP_PRIV _STLP_PRIV_NAME::# define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME {# define _STLP_MOVE_TO_STD_NAMESPACE }# endif# else# define _STLP_PRIV# define _STLP_MOVE_TO_PRIV_NAMESPACE# define _STLP_MOVE_TO_STD_NAMESPACE# endif/* decide whether or not we use separate namespace for rel ops */# if defined (_STLP_NO_RELOPS_NAMESPACE)# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {}# define _STLP_END_RELOPS_NAMESPACE }# else/* Use std::rel_ops namespace */# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {# define _STLP_END_RELOPS_NAMESPACE } }# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE# endif /* Use std::rel_ops namespace */# define _STLP_STD ::_STLP_STD_NAME/* Official STLport namespace when std is not redefined. * Here we don't use a macro as stlport is used as file name by boost * and folder name under beos: */namespace stlport = _STLP_STD_NAME;/* Backward compatibility: */namespace _STL = _STLP_STD_NAME;#undef __STLPORT_NAMESPACE#define __STLPORT_NAMESPACE _STLP_STD_NAME#else /* _STLP_USE_NAMESPACES *//* STLport is being put into global namespace */# define _STLP_STD# define _STLP_PRIV# define _STLP_BEGIN_NAMESPACE# define _STLP_END_NAMESPACE# define _STLP_MOVE_TO_PRIV_NAMESPACE# define _STLP_MOVE_TO_STD_NAMESPACE/* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE causes less problems than having relational operator templates in global namespace Please define _STLP_NO_RELOPS_NAMESPACE in config/user_config.h if your code rely on them. */# if !defined (_STLP_NO_RELOPS_NAMESPACE)# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE# endif# define _STLP_BEGIN_RELOPS_NAMESPACE# define _STLP_END_RELOPS_NAMESPACE# undef _STLP_USE_OWN_NAMESPACE#endif /* _STLP_USE_NAMESPACES */#define STLPORT_CSTD _STLP_VENDOR_CSTD#define STLPORT _STLP_STD_NAME#if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG)# define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T>#else# define _STLP_SIMPLE_TYPE(T) T#endif#ifndef _STLP_RAND48# define _STLP_NO_DRAND48#endif/* advanced keywords usage */#define __C_CAST(__x, __y) ((__x)(__y))#ifndef _STLP_NO_NEW_STYLE_CASTS# define __CONST_CAST(__x,__y) const_cast<__x>(__y)# define __STATIC_CAST(__x,__y) static_cast<__x>(__y)# define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y)# define __DYNAMIC_CAST(__x,__y) dynamic_cast<__x>(__y)#else# define __STATIC_CAST(__x,__y) __C_CAST(__x, __y)# define __CONST_CAST(__x,__y) __C_CAST(__x, __y)# define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y)# define __DYNAMIC_CAST(__x,__y) __C_CAST(__x, __y)#endif#if defined (_STLP_NEED_TYPENAME) && ! defined (typename)# define typename#endif#if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE )# define _STLP_TYPENAME_ON_RETURN_TYPE#else# define _STLP_TYPENAME_ON_RETURN_TYPE typename#endif#ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER# define _STLP_HEADER_TYPENAME#else# define _STLP_HEADER_TYPENAME typename#endif#ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD# define _STLP_TEMPLATE template#else# define _STLP_TEMPLATE#endif#if defined (_STLP_USE_CONTAINERS_EXTENSION)# define _STLP_KEY_TYPE_FOR_CONT_EXT(type)# define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>#else# define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT;# define _STLP_TEMPLATE_FOR_CONT_EXT#endif#if defined (_STLP_NEED_EXPLICIT) && !defined (explicit)# define explicit#endif#if !defined (_STLP_NEED_MUTABLE)# define _STLP_ASSIGN_MUTABLE(type,x,y) x = y#else# define _STLP_ASSIGN_MUTABLE(type,x,y) __CONST_CAST(type,x)=y# define mutable#endif#if defined (_STLP_NO_SIGNED_BUILTINS)/* old HP-UX doesn't understand "signed" keyword */# define signed#endif#if defined (_STLP_LOOP_INLINE_PROBLEMS)# define _STLP_INLINE_LOOP#else# define _STLP_INLINE_LOOP inline#endif#define _STLP_PRIVATE public#ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX# define _STLP_TEMPLATE_NULL template<>#else# define _STLP_TEMPLATE_NULL#endif#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER# define _STLP_OPERATOR_TEMPLATE#else# define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL#endif#ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION/* unless we have other compiler problem, try simulating partial spec here */# if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)# define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS# endif/* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */# if (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))# if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES )# define _STLP_USE_OLD_HP_ITERATOR_QUERIES# endif# elif defined ( _STLP_NO_ANACHRONISMS )# undef _STLP_USE_OLD_HP_ITERATOR_QUERIES# endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?