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