epoc32/include/stdapis/stlport/stl/wrappers/_deque.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /*
     2  *
     3  * Copyright (c) 1994
     4  * Hewlett-Packard Company
     5  *
     6  * Copyright (c) 1996,1997
     7  * Silicon Graphics Computer Systems, Inc.
     8  *
     9  * Copyright (c) 1997
    10  * Moscow Center for SPARC Technology
    11  *
    12  * Copyright (c) 1999 
    13  * Boris Fomitchev
    14  *
    15  * This material is provided "as is", with absolutely no warranty expressed
    16  * or implied. Any use is at your own risk.
    17  *
    18  * Permission to use or copy this software for any purpose is hereby granted 
    19  * without fee, provided the above notices are retained on all copies.
    20  * Permission to modify the code and to distribute modified code is granted,
    21  * provided the above notices are retained, and a notice that the code was
    22  * modified is included with the above copyright notice.
    23  *
    24  */
    25 
    26 #ifndef _STLP_INTERNAL_DEQUE_H
    27 # include <stl/_deque.h>
    28 #endif
    29 
    30 # if defined (_STLP_DEBUG)
    31 #  define _DEQUE_SUPER_NAME _DBG_deque
    32 # else
    33 #  define _DEQUE_SUPER_NAME __deque__
    34 # endif
    35 
    36 # define _DEQUE_SUPER   _DEQUE_SUPER_NAME<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
    37 
    38 _STLP_BEGIN_NAMESPACE
    39 
    40 // provide a "default" deque adaptor
    41 template <class _Tp>
    42 class deque : public _DEQUE_SUPER {
    43 public:
    44   typedef deque<_Tp> _Self;
    45   typedef _DEQUE_SUPER _Super;
    46   __IMPORT_WITH_REVERSE_ITERATORS(_Super)
    47     __IMPORT_SUPER_COPY_ASSIGNMENT(deque, _Self, _DEQUE_SUPER)
    48     deque() : _DEQUE_SUPER() { }
    49   deque(size_type __n, const _Tp& __value) : _DEQUE_SUPER(__n, __value) { }
    50   explicit deque(size_type __n) : _DEQUE_SUPER(__n) { }
    51   deque(const _Tp* __first, const _Tp* __last) : _DEQUE_SUPER(__first, __last) { }
    52   deque(const_iterator __first, const_iterator __last) : _DEQUE_SUPER(__first, __last) { }
    53   ~deque() { }
    54 };
    55 
    56 #  if defined (_STLP_BASE_MATCH_BUG)
    57 template <class _Tp>
    58 inline bool 
    59 operator==(const deque<_Tp>& __x, const deque<_Tp>& __y) {
    60     return __x.size() == __y.size() && equal(__x.begin(), __x.end(), __y.begin());
    61 }
    62 
    63 template <class _Tp>
    64 inline bool 
    65 operator<(const deque<_Tp>& __x, const deque<_Tp>& __y) {
    66     return lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
    67 }
    68 #  endif /* BASE_MATCH_BUG */
    69 
    70 # undef _DEQUE_SUPER
    71 
    72 _STLP_END_NAMESPACE  
    73 
    74 // Local Variables:
    75 // mode:C++
    76 // End: