_ptrs_specialize.h

00001 #ifndef _STLP_PTRS_SPECIALIZE_H
00002 # define _STLP_PTRS_SPECIALIZE_H
00003 
00004 // the following is a workaround for arrow operator problems
00005 #  if defined  ( _STLP_NO_ARROW_OPERATOR ) 
00006 // User wants to disable proxy -> operators
00007 #    define _STLP_DEFINE_ARROW_OPERATOR
00008 #    define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
00009 # else
00010 // Compiler can handle generic -> operator.
00011 #  define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)         //*TY 2/28/01 - re-inserted per previous beta
00012 #  ifdef __BORLANDC__
00013 #   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(*(*this)); }
00014 #  elif defined ( _STLP_WINCE ) || defined(__WATCOMC__)
00015 #   define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; }
00016 #  else
00017 #   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(operator*()); }
00018 #  endif
00019 # endif /* _STLP_NO_ARROW_OPERATOR */
00020 
00021 // Important pointers specializations
00022 
00023 # ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
00024 #  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type)
00025 #  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type)
00026 # else
00027 #  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux<true> {};
00028 #  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \
00029 _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \
00030 _STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \
00031 _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \
00032 _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \
00033 _STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \
00034 _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \
00035 _STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***)
00036 # endif
00037 
00038 # define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Type)
00039 
00040 #  if !defined ( _STLP_NO_BOOL )
00041 _STLP_POINTERS_SPECIALIZE( bool )
00042 #  endif
00043 _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void)
00044 # ifndef _STLP_NO_SIGNED_BUILTINS
00045   _STLP_POINTERS_SPECIALIZE( signed char )
00046 # endif
00047   _STLP_POINTERS_SPECIALIZE( char )
00048   _STLP_POINTERS_SPECIALIZE( unsigned char )
00049   _STLP_POINTERS_SPECIALIZE( short )
00050   _STLP_POINTERS_SPECIALIZE( unsigned short )
00051   _STLP_POINTERS_SPECIALIZE( int )
00052   _STLP_POINTERS_SPECIALIZE( unsigned int )
00053   _STLP_POINTERS_SPECIALIZE( long )
00054   _STLP_POINTERS_SPECIALIZE( unsigned long )
00055   _STLP_POINTERS_SPECIALIZE( float )
00056   _STLP_POINTERS_SPECIALIZE( double )
00057 #  if !defined ( _STLP_NO_LONG_DOUBLE )
00058   _STLP_POINTERS_SPECIALIZE( long double )
00059 #  endif
00060 #  if defined ( _STLP_LONG_LONG)
00061   _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG )
00062   _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG )
00063 #  endif
00064 #if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
00065   _STLP_POINTERS_SPECIALIZE( wchar_t )
00066 #  endif
00067 
00068 # undef _STLP_ARROW_SPECIALIZE
00069 # undef _STLP_ARROW_SPECIALIZE_WITH_PTRS
00070 # undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V
00071 
00072 #endif

Generated on Mon Jun 5 10:20:46 2006 for Intelligence.kdevelop by  doxygen 1.4.6