epoc32/include/stdapis/stlport/stl/_ptrs_specialize.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/stl/_ptrs_specialize.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +#ifndef _STLP_PTRS_SPECIALIZE_H
     1.5 +# define _STLP_PTRS_SPECIALIZE_H
     1.6 +
     1.7 +// the following is a workaround for arrow operator problems
     1.8 +#  if defined  ( _STLP_NO_ARROW_OPERATOR ) 
     1.9 +// User wants to disable proxy -> operators
    1.10 +#    define _STLP_DEFINE_ARROW_OPERATOR
    1.11 +#    define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
    1.12 +# else
    1.13 +// Compiler can handle generic -> operator.
    1.14 +#  define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
    1.15 +#  ifdef __BORLANDC__
    1.16 +#   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(*(*this)); }
    1.17 +#  elif defined ( _STLP_WINCE ) || defined(__WATCOMC__)
    1.18 +#   define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; }
    1.19 +#  else
    1.20 +#   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(operator*()); }
    1.21 +#  endif
    1.22 +# endif /* _STLP_NO_ARROW_OPERATOR */
    1.23 +
    1.24 +// Important pointers specializations
    1.25 +
    1.26 +# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
    1.27 +#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type)
    1.28 +#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type)
    1.29 +# else
    1.30 +#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux<true> {};
    1.31 +#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \
    1.32 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \
    1.33 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \
    1.34 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \
    1.35 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \
    1.36 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \
    1.37 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \
    1.38 +_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***)
    1.39 +# endif
    1.40 +
    1.41 +# define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Type)
    1.42 +
    1.43 +#  if !defined ( _STLP_NO_BOOL )
    1.44 +_STLP_POINTERS_SPECIALIZE( bool )
    1.45 +#  endif
    1.46 +_STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void)
    1.47 +# ifndef _STLP_NO_SIGNED_BUILTINS
    1.48 +  _STLP_POINTERS_SPECIALIZE( signed char )
    1.49 +# endif
    1.50 +  _STLP_POINTERS_SPECIALIZE( char )
    1.51 +  _STLP_POINTERS_SPECIALIZE( unsigned char )
    1.52 +  _STLP_POINTERS_SPECIALIZE( short )
    1.53 +  _STLP_POINTERS_SPECIALIZE( unsigned short )
    1.54 +  _STLP_POINTERS_SPECIALIZE( int )
    1.55 +  _STLP_POINTERS_SPECIALIZE( unsigned int )
    1.56 +  _STLP_POINTERS_SPECIALIZE( long )
    1.57 +  _STLP_POINTERS_SPECIALIZE( unsigned long )
    1.58 +  _STLP_POINTERS_SPECIALIZE( float )
    1.59 +  _STLP_POINTERS_SPECIALIZE( double )
    1.60 +#  if !defined ( _STLP_NO_LONG_DOUBLE )
    1.61 +  _STLP_POINTERS_SPECIALIZE( long double )
    1.62 +#  endif
    1.63 +#  if defined ( _STLP_LONG_LONG)
    1.64 +  _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG )
    1.65 +  _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG )
    1.66 +#  endif
    1.67 +#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
    1.68 +  _STLP_POINTERS_SPECIALIZE( wchar_t )
    1.69 +#  endif
    1.70 +
    1.71 +# undef _STLP_ARROW_SPECIALIZE
    1.72 +# undef _STLP_ARROW_SPECIALIZE_WITH_PTRS
    1.73 +# undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V
    1.74 +
    1.75 +#endif