features.h
来自「symbian 上的stl_port进过编译的。」· C头文件 代码 · 共 1,195 行 · 第 1/3 页
H
1,195 行
#endif#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS# define _STLP_NULL_TMPL_ARGS <># else# define _STLP_NULL_TMPL_ARGS#endif#if !defined (_STLP_ALLOCATOR_TYPE_DFL)# if defined (_STLP_DONT_SUP_DFLT_PARAM)# define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS# endif# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)# define _STLP_ALLOCATOR_TYPE_DFL# else# define _STLP_ALLOCATOR_TYPE_DFL = allocator_type()# endif#endif/* When the compiler do not correctly initialized the basic types value in default parameters we prefer * to avoid them to be able to correct this bug. */#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)# define _STLP_DONT_SUP_DFLT_PARAM 1#endif#if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR)# define _STLP_NO_ARROW_OPERATOR#endif#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)# if !(defined (_STLP_NO_ARROW_OPERATOR)) && \ !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY)/* this one is needed for proper reverse_iterator<> operator ->() handling */# define _STLP_MSVC50_COMPATIBILITY 1# endif#endif#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )# if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \ typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator# elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__)# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \ typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator# else# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \ typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator# endif#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */# if defined (_STLP_MSVC50_COMPATIBILITY)# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \ const_pointer, difference_type> const_reverse_iterator; \ typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \ reverse_iterator# else# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \ difference_type> const_reverse_iterator; \ typedef _STLP_STD::__reverse_iterator<iterator, value_type, \ reference, difference_type> \ reverse_iterator# endif#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \ _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator)#define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \ _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator)#define __IMPORT_CONTAINER_TYPEDEFS(_Super) \ typedef typename _Super::value_type value_type; \ typedef typename _Super::size_type size_type; \ typedef typename _Super::difference_type difference_type; \ typedef typename _Super::reference reference; \ typedef typename _Super::const_reference const_reference; \ typedef typename _Super::pointer pointer; \ typedef typename _Super::const_pointer const_pointer; \ typedef typename _Super::allocator_type allocator_type;#define __IMPORT_ITERATORS(_Super) \ typedef typename _Super::iterator iterator; \ typedef typename _Super::const_iterator const_iterator;#define __IMPORT_REVERSE_ITERATORS(_Super) \ typedef typename _Super::const_reverse_iterator const_reverse_iterator; \ typedef typename _Super::reverse_iterator reverse_iterator;#define __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER) \ __derived_name(const _Super& __x) : _SUPER(__x) {} \ _Self& operator=(const _Super& __x) { \ *(_Super*)this = __x; \ return *this; \ } \ __derived_name(const _Self& __x) : _SUPER(__x) {} \ _Self& operator=(const _Self& __x) { \ *(_Super*)this = __x; \ return *this; \ }#define __IMPORT_WITH_ITERATORS(_Super) \ __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super)#define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \ __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super)#if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG)# define __TRIVIAL_CONSTRUCTOR(__type) __type() {}#else# define __TRIVIAL_CONSTRUCTOR(__type)#endif#if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG)# define __TRIVIAL_DESTRUCTOR(__type) ~__type() {}#else# define __TRIVIAL_DESTRUCTOR(__type)#endif#define __TRIVIAL_STUFF(__type) \ __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type)#if defined (_STLP_HAS_NO_EXCEPTIONS)# define _STLP_NO_EXCEPTIONS#endif#if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS)# define _STLP_USE_EXCEPTIONS#endif#if defined (_STLP_USE_EXCEPTIONS)# define _STLP_TRY try# define _STLP_CATCH_ALL catch(...)# ifndef _STLP_THROW# define _STLP_THROW(x) throw x# endif# define _STLP_RETHROW throw# define _STLP_UNWIND(action) catch(...) { action; throw; }# ifdef _STLP_THROW_RETURN_BUG# define _STLP_RET_AFTER_THROW(data) return data;# else# define _STLP_RET_AFTER_THROW(data)# endif/* We do not use exception throw specifications unless we are forced to */# if !defined (_STLP_THROWS)# define _STLP_THROWS(x)# endif# if !defined (_STLP_NOTHROW)# define _STLP_NOTHROW# endif#else# define _STLP_TRY# define _STLP_CATCH_ALL if (false)# ifndef _STLP_THROW# define _STLP_THROW(x)# endif# define _STLP_RETHROW {}# define _STLP_UNWIND(action)# define _STLP_THROWS(x)# define _STLP_NOTHROW# define _STLP_RET_AFTER_THROW(data)#endif/* * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no * exception support but not the _STLP_USE_EXCEPTIONS which simply means * that the user do not want to use them. */#if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC)# define _STLP_THROWS_INHERENTLY(x) throw x# define _STLP_NOTHROW_INHERENTLY throw()#else# define _STLP_THROWS_INHERENTLY(x)# define _STLP_NOTHROW_INHERENTLY#endif/* STLport function not returning are functions that throw so we translate * the noreturn functions in throwing functions taking also into account * exception support activation. */#if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \ !defined (_STLP_FUNCTION_THROWS)# define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION#else# define _STLP_FUNCTION_THROWS#endif#if defined(_STLP_NO_BOOL)# if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX)# include <isynonym.hpp># if defined (__OS400__)typedef int bool;# elif !( defined (__xlC__) || defined (_AIX))typedef Boolean bool;# endif# else# if defined(_STLP_YVALS_H)# include <yvals.h># else# if defined (_STLP_DONT_USE_BOOL_TYPEDEF)# define bool int# elsetypedef int bool;# endif# define true 1# define false 0# endif# endif /* __IBMCPP__ */#else# define _STLP_BOOL_KEYWORD 1#endif /* _STLP_NO_BOOL */#ifndef _STLP_MPW_EXTRA_CONST# define _STLP_MPW_EXTRA_CONST#endif#ifndef _STLP_DEFAULTCHAR# define _STLP_DEFAULTCHAR char#endif#if defined (_STLP_DEBUG_ALLOC) && !defined (_STLP_ASSERTIONS)# define _STLP_ASSERTIONS 1#endif/* uninitialized value filler */#ifndef _STLP_SHRED_BYTE/* This value is designed to cause problems if an error occurs */# define _STLP_SHRED_BYTE 0xA3#endif /* _STLP_SHRED_BYTE *//* shared library tune-up */#ifndef _STLP_IMPORT_DECLSPEC# define _STLP_IMPORT_DECLSPEC#endif/* a keyword used to instantiate export template */#ifndef _STLP_EXPORT_TEMPLATE_KEYWORD# define _STLP_EXPORT_TEMPLATE_KEYWORD#endif#ifndef _STLP_IMPORT_TEMPLATE_KEYWORD# define _STLP_IMPORT_TEMPLATE_KEYWORD#endif#ifdef _STLP_USE_NO_IOSTREAMS/* * If we do not use iostreams we do not use the export/import * techniques to avoid build of the STLport library. */# undef _STLP_USE_DECLSPEC/* We also undef USE_DYNAMIC_LIB macro as this macro add some code * to use the dynamic (shared) STLport library for some platform/compiler * configuration leading to problem when do not link to the STLport lib. */# undef _STLP_USE_DYNAMIC_LIB#endif#if defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC)# if ! defined (_STLP_USE_TEMPLATE_EXPORT)/* this setting turns on "extern template" extension use */# define _STLP_USE_TEMPLATE_EXPORT# endif# if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE)# define _STLP_NO_FORCE_INSTANTIATE# endif#endif#if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */# define _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD#else# define _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD#endif#ifndef _STLP_EXPORT_TEMPLATE# define _STLP_EXPORT_TEMPLATE _STLP_EXPORT template#endif#if defined (_STLP_USE_DECLSPEC) /* using export/import technique */# ifndef _STLP_EXPORT_DECLSPEC# define _STLP_EXPORT_DECLSPEC# endif# ifndef _STLP_IMPORT_DECLSPEC# define _STLP_IMPORT_DECLSPEC# endif# ifndef _STLP_CLASS_EXPORT_DECLSPEC# define _STLP_CLASS_EXPORT_DECLSPEC# endif# ifndef _STLP_CLASS_IMPORT_DECLSPEC# define _STLP_CLASS_IMPORT_DECLSPEC# endif# if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */# define _STLP_DECLSPEC _STLP_EXPORT_DECLSPEC# define _STLP_CLASS_DECLSPEC _STLP_CLASS_EXPORT_DECLSPEC# else# define _STLP_DECLSPEC _STLP_IMPORT_DECLSPEC /* Other modules, importing STLport exports */# define _STLP_CLASS_DECLSPEC _STLP_CLASS_IMPORT_DECLSPEC# endif#else /* Not using DLL export/import specifications */# define _STLP_DECLSPEC# define _STLP_CLASS_DECLSPEC#endif#define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC#if defined (_STLP_MSVC) || defined (__ICL)# define _STLP_STATIC_MEMBER_DECLSPEC#else# define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC#endif#if !defined (_STLP_CALL)# define _STLP_CALL#endif#ifndef _STLP_USE_NO_IOSTREAMS# if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM)# define __USE_STD_IOSTREAM# endif/* We only need to expose details of streams implementation if we use non-standard i/o or are building STLport*/# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO)# define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1# endif/* We only need to expose details of global implementation if we are building STLport or have not instantiated everything in the lib */# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE)# undef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1# endif#else /* _STLP_USE_NO_IOSTREAMS *//* when we are not using SGI iostreams, we must expose globals, but not streams implementation */# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION#endif /* _STLP_USE_NO_IOSTREAMS */#ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS# define _STLP_PSPEC2(t1,t2) < t1,t2 ># define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 >#else# define _STLP_PSPEC2(t1,t2) /* nothing */# define _STLP_PSPEC3(t1,t2,t3) /* nothing */#endif/* Activation of the partial template workaround: */#if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\ (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER))# define _STLP_USE_PARTIAL_SPEC_WORKAROUND#endif#ifndef _STLP_USE_NO_IOSTREAMS# define _STLP_NEW_IO_NAMESPACE _STLP_STD# define _STLP_NO_WIDE_STREAMS _STLP_NO_WCHAR_T#endif#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \_TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\_TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y) {return __y < __x;}\_TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\_TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);}#else# define _STLP_RELOPS_OPERATORS(_TMPL, _TP)#endif#if defined ( _STLP_USE_ABBREVS )# include <stl/_abbrevs.h>#endif/* A really useful macro */#define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0])#define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0])/* some cleanup */#undef _STLP_DONT_USE_BOOL_TYPEDEF#undef _STLP_YVALS_H#undef _STLP_LOOP_INLINE_PROBLEMS#undef _STLP_NEED_EXPLICIT#undef _STLP_NEED_TYPENAME#undef _STLP_NO_NEW_STYLE_CASTS#undef __AUTO_CONFIGURED#endif /* _STLP_FEATURES_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?