epoc32/include/stdapis/stlport/stl/_map.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/stl/_map.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/stl/_map.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,524 @@
     1.4 -_map.h
     1.5 +/*
     1.6 + *
     1.7 + * Copyright (c) 1994
     1.8 + * Hewlett-Packard Company
     1.9 + *
    1.10 + * Copyright (c) 1996,1997
    1.11 + * Silicon Graphics Computer Systems, Inc.
    1.12 + *
    1.13 + * Copyright (c) 1997
    1.14 + * Moscow Center for SPARC Technology
    1.15 + *
    1.16 + * Copyright (c) 1999 
    1.17 + * Boris Fomitchev
    1.18 + *
    1.19 + * This material is provided "as is", with absolutely no warranty expressed
    1.20 + * or implied. Any use is at your own risk.
    1.21 + *
    1.22 + * Permission to use or copy this software for any purpose is hereby granted 
    1.23 + * without fee, provided the above notices are retained on all copies.
    1.24 + * Permission to modify the code and to distribute modified code is granted,
    1.25 + * provided the above notices are retained, and a notice that the code was
    1.26 + * modified is included with the above copyright notice.
    1.27 + *
    1.28 + */
    1.29 +
    1.30 +/* NOTE: This is an internal header file, included by other STL headers.
    1.31 + *   You should not attempt to use it directly.
    1.32 + */
    1.33 +
    1.34 +#ifndef _STLP_INTERNAL_MAP_H
    1.35 +#define _STLP_INTERNAL_MAP_H
    1.36 +
    1.37 +#ifndef _STLP_INTERNAL_TREE_H
    1.38 +# include <stl/_tree.h>
    1.39 +#endif
    1.40 +
    1.41 +#define map __WORKAROUND_RENAME(map)
    1.42 +#define multimap __WORKAROUND_RENAME(multimap)
    1.43 +
    1.44 +_STLP_BEGIN_NAMESPACE
    1.45 +
    1.46 +template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ), 
    1.47 +          _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) >
    1.48 +class map 
    1.49 +{
    1.50 +public:
    1.51 +
    1.52 +// typedefs:
    1.53 +
    1.54 +  typedef _Key                  key_type;
    1.55 +  typedef _Tp                   data_type;
    1.56 +  typedef _Tp                   mapped_type;
    1.57 +  typedef pair<const _Key, _Tp> value_type;
    1.58 +  typedef _Compare              key_compare;
    1.59 +    
    1.60 +  class value_compare
    1.61 +    : public binary_function<value_type, value_type, bool> {
    1.62 +  friend class map<_Key,_Tp,_Compare,_Alloc>;
    1.63 +  protected :
    1.64 +    _Compare _M_comp;
    1.65 +    value_compare(_Compare __c) : _M_comp(__c) {}
    1.66 +  public:
    1.67 +    bool operator()(const value_type& __x, const value_type& __y) const {
    1.68 +      return _M_comp(__x.first, __y.first);
    1.69 +    }
    1.70 +  };
    1.71 +
    1.72 +private:
    1.73 +# ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
    1.74 +  typedef _Rb_tree<key_type, value_type, 
    1.75 +                   _Select1st_hint<value_type, _Key>, key_compare, _Alloc> _Rep_type;
    1.76 +# else
    1.77 +  typedef _Rb_tree<key_type, value_type, 
    1.78 +                   _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
    1.79 +# endif
    1.80 +  _Rep_type _M_t;  // red-black tree representing map
    1.81 +public:
    1.82 +  typedef typename _Rep_type::pointer pointer;
    1.83 +  typedef typename _Rep_type::const_pointer const_pointer;
    1.84 +  typedef typename _Rep_type::reference reference;
    1.85 +  typedef typename _Rep_type::const_reference const_reference;
    1.86 +  typedef typename _Rep_type::iterator iterator;
    1.87 +  typedef typename _Rep_type::const_iterator const_iterator;
    1.88 +  typedef typename _Rep_type::reverse_iterator reverse_iterator;
    1.89 +  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
    1.90 +  typedef typename _Rep_type::size_type size_type;
    1.91 +  typedef typename _Rep_type::difference_type difference_type;
    1.92 +  typedef typename _Rep_type::allocator_type allocator_type;
    1.93 +  typedef map<_Key,_Tp,_Compare,_Alloc> _Self;
    1.94 +
    1.95 +  // allocation/deallocation
    1.96 +
    1.97 +  map() : _M_t(_Compare(), allocator_type()) {
    1.98 +    _STLP_POP_IF_CHECK
    1.99 +  }
   1.100 +
   1.101 +  explicit map(const _Compare& __comp,
   1.102 +               const allocator_type& __a = allocator_type())
   1.103 +    : _M_t(__comp, __a) {
   1.104 +    _STLP_POP_IF_CHECK
   1.105 +  }
   1.106 +
   1.107 +#ifdef _STLP_MEMBER_TEMPLATES
   1.108 +  template <class _InputIterator>
   1.109 +  map(_InputIterator __first, _InputIterator __last)
   1.110 +    : _M_t(_Compare(), allocator_type())
   1.111 +    { 
   1.112 +      _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.113 +      _M_t.insert_unique(__first, __last);
   1.114 +      _STLP_POP_CLEANUP_ITEM
   1.115 +    }
   1.116 +
   1.117 +  template <class _InputIterator>
   1.118 +  map(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
   1.119 +      const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
   1.120 +    : _M_t(__comp, __a) {
   1.121 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.122 +    _M_t.insert_unique(__first, __last); 
   1.123 +    _STLP_POP_CLEANUP_ITEM
   1.124 +  }
   1.125 +
   1.126 +# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
   1.127 +  template <class _InputIterator>
   1.128 +  map(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
   1.129 +    : _M_t(__comp, allocator_type()) 
   1.130 +  { _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.131 +    _M_t.insert_unique(__first, __last);
   1.132 +    _STLP_POP_CLEANUP_ITEM
   1.133 +  }
   1.134 +# endif
   1.135 +
   1.136 +#else
   1.137 +  map(const value_type* __first, const value_type* __last)
   1.138 +    : _M_t(_Compare(), allocator_type())
   1.139 +    { _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.140 +      _M_t.insert_unique(__first, __last); 
   1.141 +      _STLP_POP_CLEANUP_ITEM
   1.142 +    }
   1.143 +
   1.144 +  map(const value_type* __first,
   1.145 +      const value_type* __last, const _Compare& __comp,
   1.146 +      const allocator_type& __a = allocator_type())
   1.147 +    : _M_t(__comp, __a) { 
   1.148 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this) 
   1.149 +    _M_t.insert_unique(__first, __last); 
   1.150 +    _STLP_POP_CLEANUP_ITEM
   1.151 +  }
   1.152 +
   1.153 +  map(const_iterator __first, const_iterator __last)
   1.154 +    : _M_t(_Compare(), allocator_type()) 
   1.155 +  {
   1.156 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.157 +    _M_t.insert_unique(__first, __last);
   1.158 +    _STLP_POP_CLEANUP_ITEM
   1.159 +  }
   1.160 +
   1.161 +  map(const_iterator __first, const_iterator __last, const _Compare& __comp,
   1.162 +      const allocator_type& __a = allocator_type())
   1.163 +    : _M_t(__comp, __a) {
   1.164 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.165 +    _M_t.insert_unique(__first, __last); 
   1.166 +    _STLP_POP_CLEANUP_ITEM
   1.167 +  }
   1.168 +
   1.169 +#endif /* _STLP_MEMBER_TEMPLATES */
   1.170 +
   1.171 +# ifdef _STLP_USE_TRAP_LEAVE
   1.172 +  map(const map<_Key,_Tp,_Compare,_Alloc>& __x)
   1.173 +  {
   1.174 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.175 +    _M_t =__x._M_t; 
   1.176 +    _STLP_POP_CLEANUP_ITEM
   1.177 +  }
   1.178 +#else
   1.179 +  map(const map<_Key,_Tp,_Compare,_Alloc>& __x) : 
   1.180 +    _M_t(__x._M_t) {
   1.181 +    _STLP_POP_IF_CHECK
   1.182 +  }
   1.183 +# endif
   1.184 +  map<_Key,_Tp,_Compare,_Alloc>&
   1.185 +  operator=(const map<_Key, _Tp, _Compare, _Alloc>& __x)
   1.186 +  {
   1.187 +    _M_t = __x._M_t;
   1.188 +    return *this; 
   1.189 +  }
   1.190 +
   1.191 +#ifdef _STLP_USE_TRAP_LEAVE
   1.192 +public:
   1.193 +  static void* operator new (size_t __n, TLeave) { return _STLP_StackHelper<bool>::_NewLC(__n); }
   1.194 +  static void* operator new (size_t __n) { return _STLP_StackHelper<bool>::_NewLC(__n); }
   1.195 +#endif
   1.196 +
   1.197 +  // accessors:
   1.198 +
   1.199 +  key_compare key_comp() const { return _M_t.key_comp(); }
   1.200 +  value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
   1.201 +  allocator_type get_allocator() const { return _M_t.get_allocator(); }
   1.202 +
   1.203 +  iterator begin() { return _M_t.begin(); }
   1.204 +  const_iterator begin() const { return _M_t.begin(); }
   1.205 +  iterator end() { return _M_t.end(); }
   1.206 +  const_iterator end() const { return _M_t.end(); }
   1.207 +  reverse_iterator rbegin() { return _M_t.rbegin(); }
   1.208 +  const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
   1.209 +  reverse_iterator rend() { return _M_t.rend(); }
   1.210 +  const_reverse_iterator rend() const { return _M_t.rend(); }
   1.211 +  bool empty() const { return _M_t.empty(); }
   1.212 +  size_type size() const { return _M_t.size(); }
   1.213 +  size_type max_size() const { return _M_t.max_size(); }
   1.214 +  _Tp& operator[](const key_type& __k) {
   1.215 +    iterator __i = lower_bound(__k);
   1.216 +    // __i->first is greater than or equivalent to __k.
   1.217 +    if (__i == end() || key_comp()(__k, (*__i).first)) {
   1.218 +# ifdef _STLP_USE_TRAP_LEAVE      
   1.219 +      value_type __tmp(__k, __false_type());
   1.220 +       _STLP_PUSH_STACK_ITEM(value_type, &__tmp)
   1.221 +      __i = insert(__i, __tmp);
   1.222 +      
   1.223 +# else
   1.224 +      __i = insert(__i, value_type(__k, _STLP_DEFAULT_CONSTRUCTED(_Tp)));
   1.225 +# endif
   1.226 +    }
   1.227 +    return (*__i).second;
   1.228 +  }
   1.229 +  void swap(map<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
   1.230 +
   1.231 +  // insert/erase
   1.232 +
   1.233 +  pair<iterator,bool> insert(const value_type& __x) 
   1.234 +    { return _M_t.insert_unique(__x); }
   1.235 +  iterator insert(iterator position, const value_type& __x)
   1.236 +    { return _M_t.insert_unique(position, __x); }
   1.237 +#ifdef _STLP_MEMBER_TEMPLATES
   1.238 +  template <class _InputIterator>
   1.239 +  void insert(_InputIterator __first, _InputIterator __last) {
   1.240 +    _M_t.insert_unique(__first, __last);
   1.241 +  }
   1.242 +#else
   1.243 +  void insert(const value_type* __first, const value_type* __last) {
   1.244 +    _M_t.insert_unique(__first, __last);
   1.245 +  }
   1.246 +  void insert(const_iterator __first, const_iterator __last) {
   1.247 +    _M_t.insert_unique(__first, __last);
   1.248 +  }
   1.249 +#endif /* _STLP_MEMBER_TEMPLATES */
   1.250 +
   1.251 +  void erase(iterator __position) { _M_t.erase(__position); }
   1.252 +  size_type erase(const key_type& __x) { return _M_t.erase(__x); }
   1.253 +  void erase(iterator __first, iterator __last)
   1.254 +    { _M_t.erase(__first, __last); }
   1.255 +  void clear() { _M_t.clear(); }
   1.256 +
   1.257 +  // map operations:
   1.258 +
   1.259 +  iterator find(const key_type& __x) { return _M_t.find(__x); }
   1.260 +  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
   1.261 +  size_type count(const key_type& __x) const { 
   1.262 +    return _M_t.find(__x) == _M_t.end() ? 0 : 1;
   1.263 +  }
   1.264 +  iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); }
   1.265 +  const_iterator lower_bound(const key_type& __x) const {
   1.266 +    return _M_t.lower_bound(__x); 
   1.267 +  }
   1.268 +  iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); }
   1.269 +  const_iterator upper_bound(const key_type& __x) const {
   1.270 +    return _M_t.upper_bound(__x); 
   1.271 +  }
   1.272 +  
   1.273 +  pair<iterator,iterator> equal_range(const key_type& __x) {
   1.274 +    return _M_t.equal_range(__x);
   1.275 +  }
   1.276 +  pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
   1.277 +    return _M_t.equal_range(__x);
   1.278 +  }
   1.279 +};
   1.280 +
   1.281 +
   1.282 +template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ), 
   1.283 +          _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) >
   1.284 +class multimap 
   1.285 +{
   1.286 +public:
   1.287 +
   1.288 +// typedefs:
   1.289 +
   1.290 +  typedef _Key                  key_type;
   1.291 +  typedef _Tp                   data_type;
   1.292 +  typedef _Tp                   mapped_type;
   1.293 +  typedef pair<const _Key, _Tp> value_type;
   1.294 +  typedef _Compare              key_compare;
   1.295 +
   1.296 +  class value_compare : public binary_function<value_type, value_type, bool> {
   1.297 +  friend class multimap<_Key,_Tp,_Compare,_Alloc>;
   1.298 +  protected:
   1.299 +    _Compare _M_comp;
   1.300 +    value_compare(_Compare __c) : _M_comp(__c) {}
   1.301 +  public:
   1.302 +    bool operator()(const value_type& __x, const value_type& __y) const {
   1.303 +      return _M_comp(__x.first, __y.first);
   1.304 +    }
   1.305 +  };
   1.306 +
   1.307 +private:
   1.308 +# ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
   1.309 +  typedef _Rb_tree<key_type, value_type, 
   1.310 +                  _Select1st_hint<value_type, _Key>, key_compare, _Alloc> _Rep_type;
   1.311 +# else
   1.312 +  typedef _Rb_tree<key_type, value_type, 
   1.313 +                  _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
   1.314 +# endif
   1.315 +  _Rep_type _M_t;  // red-black tree representing multimap
   1.316 +public:
   1.317 +  typedef typename _Rep_type::pointer pointer;
   1.318 +  typedef typename _Rep_type::const_pointer const_pointer;
   1.319 +  typedef typename _Rep_type::reference reference;
   1.320 +  typedef typename _Rep_type::const_reference const_reference;
   1.321 +  typedef typename _Rep_type::iterator iterator;
   1.322 +  typedef typename _Rep_type::const_iterator const_iterator; 
   1.323 +  typedef typename _Rep_type::reverse_iterator reverse_iterator;
   1.324 +  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
   1.325 +  typedef typename _Rep_type::size_type size_type;
   1.326 +  typedef typename _Rep_type::difference_type difference_type;
   1.327 +  typedef typename _Rep_type::allocator_type allocator_type;
   1.328 +  typedef multimap<_Key,_Tp,_Compare,_Alloc> _Self;
   1.329 +
   1.330 +// allocation/deallocation
   1.331 +
   1.332 +  multimap() : _M_t(_Compare(), allocator_type()) {
   1.333 +    _STLP_POP_IF_CHECK
   1.334 +  }
   1.335 +
   1.336 +  explicit multimap(const _Compare& __comp,
   1.337 +                    const allocator_type& __a = allocator_type())
   1.338 +    : _M_t(__comp, __a) { 
   1.339 +    _STLP_POP_IF_CHECK
   1.340 +  }
   1.341 +
   1.342 +#ifdef _STLP_MEMBER_TEMPLATES  
   1.343 +  template <class _InputIterator>
   1.344 +  multimap(_InputIterator __first, _InputIterator __last)
   1.345 +    : _M_t(_Compare(), allocator_type())
   1.346 +    { 
   1.347 +      _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.348 +      _M_t.insert_equal(__first, __last); 
   1.349 +      _STLP_POP_CLEANUP_ITEM
   1.350 +    }
   1.351 +# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
   1.352 +  template <class _InputIterator>
   1.353 +  multimap(_InputIterator __first, _InputIterator __last,
   1.354 +           const _Compare& __comp)
   1.355 +    : _M_t(__comp, allocator_type()) { 
   1.356 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.357 +    _M_t.insert_equal(__first, __last); 
   1.358 +    _STLP_POP_CLEANUP_ITEM
   1.359 +  }
   1.360 +#  endif
   1.361 +  template <class _InputIterator>
   1.362 +  multimap(_InputIterator __first, _InputIterator __last,
   1.363 +           const _Compare& __comp,
   1.364 +           const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
   1.365 +    : _M_t(__comp, __a) { 
   1.366 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.367 +    _M_t.insert_equal(__first, __last); 
   1.368 +    _STLP_POP_CLEANUP_ITEM
   1.369 +  }
   1.370 +#else
   1.371 +  multimap(const value_type* __first, const value_type* __last)
   1.372 +    : _M_t(_Compare(), allocator_type())
   1.373 +    { 
   1.374 +      _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.375 +      _M_t.insert_equal(__first, __last); 
   1.376 +      _STLP_POP_CLEANUP_ITEM
   1.377 +    }
   1.378 +  multimap(const value_type* __first, const value_type* __last,
   1.379 +           const _Compare& __comp,
   1.380 +           const allocator_type& __a = allocator_type())
   1.381 +    : _M_t(__comp, __a) { 
   1.382 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.383 +      _M_t.insert_equal(__first, __last); 
   1.384 +    _STLP_POP_CLEANUP_ITEM
   1.385 +      }
   1.386 +
   1.387 +  multimap(const_iterator __first, const_iterator __last)
   1.388 +    : _M_t(_Compare(), allocator_type())
   1.389 +    { 
   1.390 +      _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.391 +      _M_t.insert_equal(__first, __last); 
   1.392 +      _STLP_POP_CLEANUP_ITEM
   1.393 +    }
   1.394 +  multimap(const_iterator __first, const_iterator __last,
   1.395 +           const _Compare& __comp,
   1.396 +           const allocator_type& __a = allocator_type())
   1.397 +    : _M_t(__comp, __a) { 
   1.398 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.399 +      _M_t.insert_equal(__first, __last); 
   1.400 +    _STLP_POP_CLEANUP_ITEM
   1.401 +
   1.402 +  }
   1.403 +#endif /* _STLP_MEMBER_TEMPLATES */
   1.404 +
   1.405 +
   1.406 +# ifdef _STLP_USE_TRAP_LEAVE
   1.407 +  multimap(const multimap<_Key,_Tp,_Compare,_Alloc>& __x)
   1.408 +  {
   1.409 +    _STLP_PUSH_CLEANUP_ITEM(_Self, this)
   1.410 +    _M_t =__x._M_t; 
   1.411 +    _STLP_POP_CLEANUP_ITEM
   1.412 +  }
   1.413 +# else
   1.414 +  multimap(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) { 
   1.415 +}
   1.416 +# endif
   1.417 +  multimap<_Key,_Tp,_Compare,_Alloc>&
   1.418 +  operator=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) {
   1.419 +    _M_t = __x._M_t;
   1.420 +    return *this; 
   1.421 +  }
   1.422 +
   1.423 +#ifdef _STLP_USE_TRAP_LEAVE
   1.424 +public:
   1.425 +  static void* operator new (size_t __n, TLeave) { return _STLP_StackHelper<bool>::_NewLC(__n); }
   1.426 +  static void* operator new (size_t __n) { return _STLP_StackHelper<bool>::_NewLC(__n); }
   1.427 +#endif
   1.428 +
   1.429 +  // accessors:
   1.430 +
   1.431 +  key_compare key_comp() const { return _M_t.key_comp(); }
   1.432 +  value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
   1.433 +  allocator_type get_allocator() const { return _M_t.get_allocator(); }
   1.434 +
   1.435 +  iterator begin() { return _M_t.begin(); }
   1.436 +  const_iterator begin() const { return _M_t.begin(); }
   1.437 +  iterator end() { return _M_t.end(); }
   1.438 +  const_iterator end() const { return _M_t.end(); }
   1.439 +  reverse_iterator rbegin() { return _M_t.rbegin(); }
   1.440 +  const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
   1.441 +  reverse_iterator rend() { return _M_t.rend(); }
   1.442 +  const_reverse_iterator rend() const { return _M_t.rend(); }
   1.443 +  bool empty() const { return _M_t.empty(); }
   1.444 +  size_type size() const { return _M_t.size(); }
   1.445 +  size_type max_size() const { return _M_t.max_size(); }
   1.446 +  void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
   1.447 +
   1.448 +  // insert/erase
   1.449 +
   1.450 +  iterator insert(const value_type& __x) { return _M_t.insert_equal(__x); }
   1.451 +  iterator insert(iterator __position, const value_type& __x) {
   1.452 +    return _M_t.insert_equal(__position, __x);
   1.453 +  }
   1.454 +#ifdef _STLP_MEMBER_TEMPLATES  
   1.455 +  template <class _InputIterator>
   1.456 +  void insert(_InputIterator __first, _InputIterator __last) {
   1.457 +    _M_t.insert_equal(__first, __last);
   1.458 +  }
   1.459 +#else
   1.460 +  void insert(const value_type* __first, const value_type* __last) {
   1.461 +    _M_t.insert_equal(__first, __last);
   1.462 +  }
   1.463 +  void insert(const_iterator __first, const_iterator __last) {
   1.464 +    _M_t.insert_equal(__first, __last);
   1.465 +  }
   1.466 +#endif /* _STLP_MEMBER_TEMPLATES */
   1.467 +  void erase(iterator __position) { _M_t.erase(__position); }
   1.468 +  size_type erase(const key_type& __x) { return _M_t.erase(__x); }
   1.469 +  void erase(iterator __first, iterator __last)
   1.470 +    { _M_t.erase(__first, __last); }
   1.471 +  void clear() { _M_t.clear(); }
   1.472 +
   1.473 +  // multimap operations:
   1.474 +
   1.475 +  iterator find(const key_type& __x) { return _M_t.find(__x); }
   1.476 +  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
   1.477 +  size_type count(const key_type& __x) const { return _M_t.count(__x); }
   1.478 +  iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); }
   1.479 +  const_iterator lower_bound(const key_type& __x) const {
   1.480 +    return _M_t.lower_bound(__x); 
   1.481 +  }
   1.482 +  iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); }
   1.483 +  const_iterator upper_bound(const key_type& __x) const {
   1.484 +    return _M_t.upper_bound(__x); 
   1.485 +  }
   1.486 +   pair<iterator,iterator> equal_range(const key_type& __x) {
   1.487 +    return _M_t.equal_range(__x);
   1.488 +  }
   1.489 +  pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
   1.490 +    return _M_t.equal_range(__x);
   1.491 +  }
   1.492 +};
   1.493 +
   1.494 +# define _STLP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare, class _Alloc>
   1.495 +
   1.496 +# define _STLP_TEMPLATE_CONTAINER map<_Key,_Tp,_Compare,_Alloc>
   1.497 +
   1.498 +// fbp : if this template header gets protected against your will, report it !
   1.499 +# include <stl/_relops_cont.h>
   1.500 +
   1.501 +# undef  _STLP_TEMPLATE_CONTAINER
   1.502 +# define _STLP_TEMPLATE_CONTAINER multimap<_Key,_Tp,_Compare,_Alloc>
   1.503 +
   1.504 +// fbp : if this template header gets protected against your will, report it !
   1.505 +# include <stl/_relops_cont.h>
   1.506 +
   1.507 +# undef  _STLP_TEMPLATE_CONTAINER
   1.508 +# undef  _STLP_TEMPLATE_HEADER
   1.509 +
   1.510 +_STLP_END_NAMESPACE
   1.511 +
   1.512 +// do a cleanup
   1.513 +#  undef map
   1.514 +#  undef multimap
   1.515 +// provide a way to access full funclionality 
   1.516 +# define __map__  __FULL_NAME(map)
   1.517 +# define __multimap__  __FULL_NAME(multimap)
   1.518 +
   1.519 +# ifdef _STLP_USE_WRAPPER_FOR_ALLOC_PARAM
   1.520 +# include <stl/wrappers/_map.h>
   1.521 +# endif
   1.522 +
   1.523 +#endif /* _STLP_INTERNAL_MAP_H */
   1.524 +
   1.525 +// Local Variables:
   1.526 +// mode:C++
   1.527 +// End:
   1.528 +