epoc32/include/tools/stlport/stl/debug/_string.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/tools/stlport/stl/debug/_string.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,866 @@
     1.4 +/*
     1.5 + * Copyright (c) 1997-1999
     1.6 + * Silicon Graphics Computer Systems, Inc.
     1.7 + *
     1.8 + * Copyright (c) 1999
     1.9 + * Boris Fomitchev
    1.10 + *
    1.11 + * This material is provided "as is", with absolutely no warranty expressed
    1.12 + * or implied. Any use is at your own risk.
    1.13 + *
    1.14 + * Permission to use or copy this software for any purpose is hereby granted
    1.15 + * without fee, provided the above notices are retained on all copies.
    1.16 + * Permission to modify the code and to distribute modified code is granted,
    1.17 + * provided the above notices are retained, and a notice that the code was
    1.18 + * modified is included with the above copyright notice.
    1.19 + */
    1.20 +
    1.21 +#ifndef _STLP_DBG_STRING_H
    1.22 +#define _STLP_DBG_STRING_H
    1.23 +
    1.24 +#ifndef _STLP_DBG_ITERATOR_H
    1.25 +#  include <stl/debug/_iterator.h>
    1.26 +#endif
    1.27 +
    1.28 +_STLP_BEGIN_NAMESPACE
    1.29 +
    1.30 +#define _STLP_NON_DBG_STRING_NAME _STLP_NON_DBG_NAME(str)
    1.31 +#define _STLP_NON_DBG_STRING _STLP_PRIV _STLP_NON_DBG_STRING_NAME <_CharT, _Traits, _Alloc>
    1.32 +
    1.33 +#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
    1.34 +template <class _CharT,class _Traits, class _Alloc>
    1.35 +inline _CharT*
    1.36 +value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_STRING >&)
    1.37 +{ return (_CharT*)0; }
    1.38 +template <class _CharT, class _Traits, class _Alloc>
    1.39 +inline random_access_iterator_tag
    1.40 +iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_STRING >&)
    1.41 +{ return random_access_iterator_tag(); }
    1.42 +#endif
    1.43 +
    1.44 +template <class _CharT, class _Traits, class _Alloc>
    1.45 +class basic_string :
    1.46 +#if !defined (__DMC__)
    1.47 +                     private
    1.48 +#else
    1.49 +                     public
    1.50 +#endif
    1.51 +                             _STLP_PRIV _STLP_CONSTRUCT_CHECKER<_STLP_NON_DBG_STRING >
    1.52 +#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (basic_string)
    1.53 +                   , public __stlport_class<basic_string<_CharT, _Traits, _Alloc> >
    1.54 +#endif
    1.55 +{
    1.56 +protected:
    1.57 +  typedef _STLP_NON_DBG_STRING _Base;
    1.58 +  typedef basic_string<_CharT, _Traits, _Alloc> _Self;
    1.59 +  typedef _STLP_PRIV _STLP_CONSTRUCT_CHECKER<_STLP_NON_DBG_STRING > _ConstructCheck;
    1.60 +  typedef typename _IsPOD<_CharT>::_Type _Char_Is_POD;
    1.61 +
    1.62 +public:
    1.63 +  __IMPORT_CONTAINER_TYPEDEFS(_Base)
    1.64 +  typedef typename _Base::traits_type traits_type;
    1.65 +  typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Nonconst_traits<value_type> > > iterator;
    1.66 +  typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Const_traits<value_type> > > const_iterator;
    1.67 +  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
    1.68 +
    1.69 +public:                         // Constructor, destructor, assignment.
    1.70 +  typedef typename _Base::_Reserve_t _Reserve_t;
    1.71 +
    1.72 +private:
    1.73 +  _Base _M_non_dbg_impl;
    1.74 +  _STLP_PRIV __owned_list _M_iter_list;
    1.75 +
    1.76 +  void _Invalidate_all()
    1.77 +  { _M_iter_list._Invalidate_all(); }
    1.78 +  void _Compare_Capacity (size_type __old_capacity) {
    1.79 +    if (this->capacity() > __old_capacity) {
    1.80 +      _Invalidate_all();
    1.81 +    }
    1.82 +  }
    1.83 +  void _Invalidate_iterator(const iterator& __it)
    1.84 +  { _STLP_PRIV __invalidate_iterator(&_M_iter_list, __it); }
    1.85 +  void _Invalidate_iterators(const iterator& __f, const iterator& __l)
    1.86 +  { _STLP_PRIV __invalidate_range(&_M_iter_list, __f, __l); }
    1.87 +
    1.88 +public:
    1.89 +#include <stl/_string_npos.h>
    1.90 +
    1.91 +  allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
    1.92 +
    1.93 +  explicit basic_string(const allocator_type& __a = allocator_type())
    1.94 +    : _M_non_dbg_impl(__a), _M_iter_list(&_M_non_dbg_impl) {}
    1.95 +
    1.96 +  basic_string(_Reserve_t __r, size_t __n,
    1.97 +               const allocator_type& __a = allocator_type())
    1.98 +    : _M_non_dbg_impl(__r, __n, __a), _M_iter_list(&_M_non_dbg_impl) {}
    1.99 +
   1.100 +  basic_string(const _Self& __s)
   1.101 +    : _ConstructCheck(__s),
   1.102 +      _M_non_dbg_impl(__s._M_non_dbg_impl), _M_iter_list(&_M_non_dbg_impl) {}
   1.103 +
   1.104 +  basic_string(const _Self& __s, size_type __pos, size_type __n = npos,
   1.105 +               const allocator_type& __a = allocator_type())
   1.106 +    : _M_non_dbg_impl(__s._M_non_dbg_impl, __pos, __n, __a),
   1.107 +      _M_iter_list(&_M_non_dbg_impl) {}
   1.108 +
   1.109 +  basic_string(const _CharT* __s, size_type __n,
   1.110 +               const allocator_type& __a = allocator_type())
   1.111 +    : _ConstructCheck(__s), _M_non_dbg_impl(__s, __n, __a),
   1.112 +      _M_iter_list(&_M_non_dbg_impl) {}
   1.113 +
   1.114 +  basic_string(const _CharT* __s,
   1.115 +               const allocator_type& __a = allocator_type())
   1.116 +    : _ConstructCheck(__s),
   1.117 +      _M_non_dbg_impl(__s, __a), _M_iter_list(&_M_non_dbg_impl) {}
   1.118 +
   1.119 +  basic_string(size_type __n, _CharT __c,
   1.120 +               const allocator_type& __a = allocator_type())
   1.121 +    : _M_non_dbg_impl(__n, __c, __a), _M_iter_list(&_M_non_dbg_impl) {}
   1.122 +
   1.123 +  basic_string(__move_source<_Self> src)
   1.124 +    : _M_non_dbg_impl(__move_source<_Base >(src.get()._M_non_dbg_impl)),
   1.125 +      _M_iter_list(&_M_non_dbg_impl) {
   1.126 +#if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
   1.127 +    src.get()._M_iter_list._Invalidate_all();
   1.128 +#else
   1.129 +    src.get()._M_iter_list._Set_owner(_M_iter_list);
   1.130 +#endif
   1.131 +  }
   1.132 +
   1.133 +#if !defined (_STLP_MEMBER_TEMPLATES) || defined(__MRC__) || defined(__SC__)
   1.134 +  basic_string(const _CharT* __f, const _CharT* __l,
   1.135 +               const allocator_type& __a = allocator_type())
   1.136 +    : _ConstructCheck(__f, __l),
   1.137 +      _M_non_dbg_impl(__f, __l, __a), _M_iter_list(&_M_non_dbg_impl) {
   1.138 +  }
   1.139 +  basic_string(const_iterator __f, const_iterator __l,
   1.140 +               const allocator_type & __a = allocator_type())
   1.141 +    : _ConstructCheck(__f, __l),
   1.142 +      _M_non_dbg_impl(__f._M_iterator, __l._M_iterator, __a), _M_iter_list(&_M_non_dbg_impl) {
   1.143 +  }
   1.144 +#else
   1.145 +  template <class _InputIterator>
   1.146 +  basic_string(_InputIterator __f, _InputIterator __l,
   1.147 +               const allocator_type & __a _STLP_ALLOCATOR_TYPE_DFL)
   1.148 +    : _ConstructCheck(__f, __l),
   1.149 +      _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l), __a),
   1.150 +      _M_iter_list(&_M_non_dbg_impl) {}
   1.151 +#  if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
   1.152 +  template <class _InputIterator>
   1.153 +  basic_string(_InputIterator __f, _InputIterator __l)
   1.154 +    : _ConstructCheck(__f, __l),
   1.155 +      _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l)),
   1.156 +      _M_iter_list(&_M_non_dbg_impl) {}
   1.157 +#  endif
   1.158 +#endif
   1.159 +
   1.160 +private:
   1.161 +  // constructor from non-debug version for substr
   1.162 +  basic_string (const _Base& __x)
   1.163 +    : _M_non_dbg_impl(__x), _M_iter_list(&_M_non_dbg_impl) {}
   1.164 +
   1.165 +public:
   1.166 +  _Self& operator=(const _Self& __s) {
   1.167 +    if (this != &__s) {
   1.168 +      assign(__s);
   1.169 +    }
   1.170 +    return *this;
   1.171 +  }
   1.172 +
   1.173 +  _Self& operator=(const _CharT* __s) {
   1.174 +    _STLP_FIX_LITERAL_BUG(__s)
   1.175 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.176 +    return assign(__s);
   1.177 +  }
   1.178 +
   1.179 +  _Self& operator=(_CharT __c) {
   1.180 +    return assign(1, __c);
   1.181 +  }
   1.182 +
   1.183 +  // Iterators.
   1.184 +  iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
   1.185 +  const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
   1.186 +  iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
   1.187 +  const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
   1.188 +
   1.189 +  reverse_iterator rbegin()             { return reverse_iterator(end()); }
   1.190 +  const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
   1.191 +  reverse_iterator rend()               { return reverse_iterator(begin()); }
   1.192 +  const_reverse_iterator rend() const   { return const_reverse_iterator(begin()); }
   1.193 +
   1.194 +  // Size, capacity, etc.
   1.195 +  size_type size() const { return _M_non_dbg_impl.size(); }
   1.196 +  size_type length() const { return _M_non_dbg_impl.length(); }
   1.197 +  size_t max_size() const { return _M_non_dbg_impl.max_size(); }
   1.198 +
   1.199 +  void resize(size_type __n, _CharT __c) {
   1.200 +    if (__n > capacity())
   1.201 +      _Invalidate_all();
   1.202 +    else if (__n < size())
   1.203 +      _Invalidate_iterators(begin() + __n, end());
   1.204 +    _M_non_dbg_impl.resize(__n, __c);
   1.205 +  }
   1.206 +  void resize(size_type __n) { resize(__n, _STLP_DEFAULT_CONSTRUCTED(_CharT)); }
   1.207 +  size_type capacity() const { return _M_non_dbg_impl.capacity(); }
   1.208 +
   1.209 +  void reserve(size_type __s = 0) {
   1.210 +    if (__s > capacity()) _Invalidate_all();
   1.211 +    _M_non_dbg_impl.reserve(__s);
   1.212 +  }
   1.213 +
   1.214 +  void clear() {
   1.215 +    _Invalidate_all();
   1.216 +    _M_non_dbg_impl.clear();
   1.217 +  }
   1.218 +
   1.219 +  bool empty() const { return _M_non_dbg_impl.empty(); }
   1.220 +
   1.221 +  const_reference operator[](size_type __n) const {
   1.222 +    _STLP_VERBOSE_ASSERT(__n <= this->size(), _StlMsg_OUT_OF_BOUNDS);
   1.223 +    return _M_non_dbg_impl[__n];
   1.224 +  }
   1.225 +
   1.226 +  reference operator[](size_type __n) {
   1.227 +    _STLP_VERBOSE_ASSERT(__n < this->size(), _StlMsg_OUT_OF_BOUNDS)
   1.228 +    return _M_non_dbg_impl[__n];
   1.229 +  }
   1.230 +
   1.231 +  const_reference at(size_type __n) const { return _M_non_dbg_impl.at(__n); }
   1.232 +  reference at(size_type __n) { return _M_non_dbg_impl.at(__n); }
   1.233 +
   1.234 +  // Append, operator+=, push_back.
   1.235 +  _Self& operator+=(const _Self& __s) { return append(__s); }
   1.236 +  _Self& operator+=(const _CharT* __s) {
   1.237 +    _STLP_FIX_LITERAL_BUG(__s)
   1.238 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.239 +    return append(__s);
   1.240 +  }
   1.241 +  _Self& operator+=(_CharT __c) { return append(1, __c); }
   1.242 +
   1.243 +#if defined (_STLP_MEMBER_TEMPLATES)
   1.244 +  template <class _InputIter>
   1.245 +  _Self& append(_InputIter __first, _InputIter __last) {
   1.246 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
   1.247 +    size_type __old_capacity = capacity();
   1.248 +    _M_non_dbg_impl.append(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
   1.249 +    _Compare_Capacity(__old_capacity);
   1.250 +    return *this;
   1.251 +  }
   1.252 +#endif
   1.253 +
   1.254 +#if !defined (_STLP_MEMBER_TEMPLATES) || \
   1.255 +    !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
   1.256 +  _Self& append(const _CharT* __f, const _CharT* __l) {
   1.257 +    _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
   1.258 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
   1.259 +    size_type __old_capacity = capacity();
   1.260 +    _M_non_dbg_impl.append(__f, __l);
   1.261 +    _Compare_Capacity(__old_capacity);
   1.262 +    return *this;
   1.263 +  }
   1.264 +
   1.265 +  _Self& append(const_iterator __f, const_iterator __l) {
   1.266 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
   1.267 +    size_type __old_capacity = capacity();
   1.268 +    _M_non_dbg_impl.append(__f._M_iterator, __l._M_iterator);
   1.269 +    _Compare_Capacity(__old_capacity);
   1.270 +    return *this;
   1.271 +  }
   1.272 +#endif
   1.273 +
   1.274 +  _Self& append(const _Self& __s) {
   1.275 +    size_type __old_capacity = capacity();
   1.276 +    _M_non_dbg_impl.append(__s._M_non_dbg_impl);
   1.277 +    _Compare_Capacity(__old_capacity);
   1.278 +    return *this;
   1.279 +  }
   1.280 +
   1.281 +  _Self& append(const _Self& __s, size_type __pos, size_type __n) {
   1.282 +    size_type __old_capacity = capacity();
   1.283 +    _M_non_dbg_impl.append(__s._M_non_dbg_impl, __pos, __n);
   1.284 +    _Compare_Capacity(__old_capacity);
   1.285 +    return *this;
   1.286 +  }
   1.287 +
   1.288 +  _Self& append(const _CharT* __s, size_type __n) {
   1.289 +    _STLP_FIX_LITERAL_BUG(__s)
   1.290 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.291 +    size_type __old_capacity = capacity();
   1.292 +    _M_non_dbg_impl.append(__s, __n);
   1.293 +    _Compare_Capacity(__old_capacity);
   1.294 +    return *this;
   1.295 +  }
   1.296 +
   1.297 +  _Self& append(const _CharT* __s) {
   1.298 +    _STLP_FIX_LITERAL_BUG(__s)
   1.299 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.300 +    size_type __old_capacity = capacity();
   1.301 +    _M_non_dbg_impl.append(__s);
   1.302 +    _Compare_Capacity(__old_capacity);
   1.303 +    return *this;
   1.304 +  }
   1.305 +
   1.306 +  _Self& append(size_type __n, _CharT __c) {
   1.307 +    size_type __old_capacity = this->capacity();
   1.308 +    _M_non_dbg_impl.append(__n, __c);
   1.309 +    _Compare_Capacity(__old_capacity);
   1.310 +    return *this;
   1.311 +  }
   1.312 +
   1.313 +  void push_back(_CharT __c) {
   1.314 +    size_type __old_capacity = this->capacity();
   1.315 +    _M_non_dbg_impl.push_back(__c);
   1.316 +    _Compare_Capacity(__old_capacity);
   1.317 +  }
   1.318 +
   1.319 +  void pop_back() {
   1.320 +    _Invalidate_iterator(this->end());
   1.321 +    _M_non_dbg_impl.pop_back();
   1.322 +  }
   1.323 +
   1.324 +  // Assign
   1.325 +private:
   1.326 +  void _M_check_assign(size_type __n) {
   1.327 +    if (__n > capacity()) {
   1.328 +      _Invalidate_all();
   1.329 +    }
   1.330 +    else if (__n < size()) {
   1.331 +      _Invalidate_iterators(begin() + __n, end());
   1.332 +    }
   1.333 +  }
   1.334 +
   1.335 +public:
   1.336 +  _Self& assign(const _Self& __s) {
   1.337 +    _M_check_assign(__s.size());
   1.338 +    _M_non_dbg_impl.assign(__s._M_non_dbg_impl);
   1.339 +    return *this;
   1.340 +  }
   1.341 +
   1.342 +  _Self& assign(const _Self& __s, size_type __pos, size_type __n) {
   1.343 +    if (__pos < __s.size()) {
   1.344 +      _M_check_assign((min) (__n, __s.size() - __pos));
   1.345 +    }
   1.346 +    _M_non_dbg_impl.assign(__s._M_non_dbg_impl, __pos, __n);
   1.347 +    return *this;
   1.348 +  }
   1.349 +
   1.350 +  _Self& assign(const _CharT* __s, size_type __n) {
   1.351 +    _STLP_FIX_LITERAL_BUG(__s)
   1.352 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.353 +    _M_check_assign((min) (_Traits::length(__s), __n));
   1.354 +    _M_non_dbg_impl.assign(__s, __s + __n);
   1.355 +    return *this;
   1.356 +  }
   1.357 +
   1.358 +  _Self& assign(const _CharT* __s) {
   1.359 +    _STLP_FIX_LITERAL_BUG(__s)
   1.360 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.361 +    _M_check_assign(_Traits::length(__s));
   1.362 +    _M_non_dbg_impl.assign(__s);
   1.363 +    return *this;
   1.364 +  }
   1.365 +
   1.366 +  _Self& assign(size_type __n, _CharT __c) {
   1.367 +    _M_check_assign(__n);
   1.368 +    _M_non_dbg_impl.assign(__n, __c);
   1.369 +    return *this;
   1.370 +  }
   1.371 +
   1.372 +#if defined(_STLP_MEMBER_TEMPLATES)
   1.373 +private:
   1.374 +  template <class _Integer>
   1.375 +  void _M_assign_dispatch(_Integer __n, _Integer __x, const __true_type& /*_Integral*/) {
   1.376 +    _M_check_assign(__n);
   1.377 +    _M_non_dbg_impl.assign((size_type)__n, (_CharT)__x);
   1.378 +  }
   1.379 +
   1.380 +  template <class _InputIter>
   1.381 +  void _M_assign_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*_Integral*/)  {
   1.382 +    _M_check_assign(distance(__f, __l));
   1.383 +    _M_non_dbg_impl.assign(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l));
   1.384 +  }
   1.385 +public:
   1.386 +  template <class _InputIter>
   1.387 +  inline _Self& assign(_InputIter __first, _InputIter __last) {
   1.388 +    _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
   1.389 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
   1.390 +    typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
   1.391 +    _M_assign_dispatch(__first, __last, _Integral());
   1.392 +    return *this;
   1.393 +  }
   1.394 +#endif
   1.395 +
   1.396 +#if !defined (_STLP_MEMBER_TEMPLATES) || \
   1.397 +    !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
   1.398 +  _Self& assign(const _CharT* __f, const _CharT* __l) {
   1.399 +    _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
   1.400 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
   1.401 +    _M_check_assign(distance(__f, __l));
   1.402 +    _M_non_dbg_impl.assign(__f, __l);
   1.403 +    return *this;
   1.404 +  }
   1.405 +  _Self& assign(const_iterator __f, const_iterator __l) {
   1.406 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
   1.407 +    _M_check_assign(distance(__f, __l));
   1.408 +    _M_non_dbg_impl.assign(__f._M_iterator, __l._M_iterator);
   1.409 +    return *this;
   1.410 +  }
   1.411 +#endif
   1.412 +
   1.413 +  // Insert
   1.414 +  _Self& insert(size_type __pos, const _Self& __s) {
   1.415 +    size_type __old_capacity = capacity();
   1.416 +    _M_non_dbg_impl.insert(__pos, __s._M_non_dbg_impl);
   1.417 +    _Compare_Capacity(__old_capacity);
   1.418 +    return *this;
   1.419 +  }
   1.420 +
   1.421 +  _Self& insert(size_type __pos, const _Self& __s,
   1.422 +                size_type __beg, size_type __n) {
   1.423 +    size_type __old_capacity = capacity();
   1.424 +    _M_non_dbg_impl.insert(__pos, __s._M_non_dbg_impl, __beg, __n);
   1.425 +    _Compare_Capacity(__old_capacity);
   1.426 +    return *this;
   1.427 +  }
   1.428 +
   1.429 +  _Self& insert(size_type __pos, const _CharT* __s, size_type __n) {
   1.430 +    _STLP_FIX_LITERAL_BUG(__s)
   1.431 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.432 +    size_type __old_capacity = capacity();
   1.433 +    _M_non_dbg_impl.insert(__pos, __s, __n);
   1.434 +    _Compare_Capacity(__old_capacity);
   1.435 +    return *this;
   1.436 +  }
   1.437 +
   1.438 +  _Self& insert(size_type __pos, const _CharT* __s) {
   1.439 +    _STLP_FIX_LITERAL_BUG(__s)
   1.440 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.441 +    return insert(__pos, __s, _Traits::length(__s));
   1.442 +  }
   1.443 +
   1.444 +  _Self& insert(size_type __pos, size_type __n, _CharT __c) {
   1.445 +    size_type __old_capacity = capacity();
   1.446 +    _M_non_dbg_impl.insert(__pos, __n, __c);
   1.447 +    _Compare_Capacity(__old_capacity);
   1.448 +    return *this;
   1.449 +  }
   1.450 +
   1.451 +  iterator insert(iterator __p, _CharT __c) {
   1.452 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
   1.453 +    size_type __old_capacity = capacity();
   1.454 +    typename _Base::iterator __ret = _M_non_dbg_impl.insert(__p._M_iterator, __c);
   1.455 +    _Compare_Capacity(__old_capacity);
   1.456 +    return iterator(&_M_iter_list, __ret);
   1.457 +  }
   1.458 +
   1.459 +  void insert(iterator __p, size_t __n, _CharT __c) {
   1.460 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
   1.461 +    size_type __old_capacity = capacity();
   1.462 +    _M_non_dbg_impl.insert(__p._M_iterator, __n, __c);
   1.463 +    _Compare_Capacity(__old_capacity);
   1.464 +  }
   1.465 +
   1.466 +#if defined (_STLP_MEMBER_TEMPLATES)
   1.467 +private:
   1.468 +  template <class _RandomIter>
   1.469 +  void _M_insert_aux (iterator __p, _RandomIter __first, _RandomIter __last,
   1.470 +                      const __true_type& /*_IsIterator*/)
   1.471 +  { _M_non_dbg_impl.insert(__p._M_iterator, __first._M_iterator, __last._M_iterator); }
   1.472 +
   1.473 +  template<class _InputIter>
   1.474 +  void _M_insert_aux (iterator __p, _InputIter __first, _InputIter __last,
   1.475 +                      const __false_type& /*_IsIterator*/) {
   1.476 +    _M_non_dbg_impl.insert(__p._M_iterator,
   1.477 +                           _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
   1.478 +  }
   1.479 +
   1.480 +public:
   1.481 +  template <class _InputIter>
   1.482 +  void insert(iterator __p, _InputIter __first, _InputIter __last) {
   1.483 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
   1.484 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first,__last))
   1.485 +
   1.486 +    /* In debug mode we are encapsulating non debug string iterators in debug one.
   1.487 +     * Doing so the non debug implementation will not check for self insertion
   1.488 +     * (x.insert(x.begin(), x.begin(), x.end()). To avoid this problem we try to
   1.489 +     * guess when _InputIter is iterator or const_iterator and in this case call
   1.490 +     * the non debug insert method with non debug string iterator.
   1.491 +     */
   1.492 +    typedef typename _AreSameUnCVTypes<_InputIter, iterator>::_Ret _IsNonConstIterator;
   1.493 +    typedef typename _AreSameUnCVTypes<_InputIter, const_iterator>::_Ret _IsConstIterator;
   1.494 +    typedef typename _Lor2<_IsNonConstIterator, _IsConstIterator>::_Ret _IsIterator;
   1.495 +
   1.496 +    size_type __old_capacity = this->capacity();
   1.497 +    _M_insert_aux(__p, __first, __last, _IsIterator());
   1.498 +    _Compare_Capacity(__old_capacity);
   1.499 +  }
   1.500 +#endif
   1.501 +
   1.502 +#if !defined (_STLP_MEMBER_TEMPLATES) || \
   1.503 +    !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
   1.504 +  void insert(iterator __p, const_iterator __f, const_iterator __l) {
   1.505 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
   1.506 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f,__l))
   1.507 +    size_type __old_capacity = capacity();
   1.508 +    _M_non_dbg_impl.insert(__p._M_iterator, __f._M_iterator, __l._M_iterator);
   1.509 +    _Compare_Capacity(__old_capacity);
   1.510 +  }
   1.511 +  void insert(iterator __p, const _CharT* __f, const _CharT* __l) {
   1.512 +    _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
   1.513 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
   1.514 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f,__l))
   1.515 +    size_type __old_capacity = capacity();
   1.516 +    _M_non_dbg_impl.insert(__p._M_iterator, __f, __l);
   1.517 +    _Compare_Capacity(__old_capacity);
   1.518 +  }
   1.519 +#endif
   1.520 +
   1.521 +  // Erase.
   1.522 +  _Self& erase(size_type __pos = 0, size_type __n = npos) {
   1.523 +    if (__pos < size()) {
   1.524 +      _Invalidate_iterators(begin() + __pos, end());
   1.525 +    }
   1.526 +    _M_non_dbg_impl.erase(__pos, __n);
   1.527 +    return *this;
   1.528 +  }
   1.529 +  iterator erase(iterator __pos) {
   1.530 +    _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
   1.531 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
   1.532 +    _Invalidate_iterators(__pos, end());
   1.533 +    return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__pos._M_iterator));
   1.534 +  }
   1.535 +  iterator erase(iterator __f, iterator __l) {
   1.536 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
   1.537 +    _Invalidate_iterators(__f, end());
   1.538 +    return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__f._M_iterator, __l._M_iterator));
   1.539 +  }
   1.540 +
   1.541 +  // Substring.
   1.542 +  _Self substr(size_type __pos = 0, size_type __n = npos) const
   1.543 +  { return _M_non_dbg_impl.substr(__pos, __n); }
   1.544 +
   1.545 +  // Replace.  (Conceptually equivalent to erase followed by insert.)
   1.546 +  _Self& replace(size_type __pos, size_type __n, const _Self& __s) {
   1.547 +    size_type __old_capacity = capacity();
   1.548 +    _M_non_dbg_impl.replace(__pos, __n, __s._M_non_dbg_impl);
   1.549 +    _Compare_Capacity(__old_capacity);
   1.550 +    return *this;
   1.551 +  }
   1.552 +
   1.553 +  _Self& replace(size_type __pos1, size_type __n1, const _Self& __s,
   1.554 +                 size_type __pos2, size_type __n2) {
   1.555 +    size_type __old_capacity = capacity();
   1.556 +    _M_non_dbg_impl.replace(__pos1, __n1, __s._M_non_dbg_impl, __pos2, __n2);
   1.557 +    _Compare_Capacity(__old_capacity);
   1.558 +    return *this;
   1.559 +  }
   1.560 +
   1.561 +  _Self& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) {
   1.562 +    _STLP_FIX_LITERAL_BUG(__s)
   1.563 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.564 +    size_type __old_capacity = capacity();
   1.565 +    _M_non_dbg_impl.replace(__pos, __n1, __s, __n2);
   1.566 +    _Compare_Capacity(__old_capacity);
   1.567 +    return *this;
   1.568 +  }
   1.569 +
   1.570 +  _Self& replace(size_type __pos, size_type __n1, const _CharT* __s) {
   1.571 +    _STLP_FIX_LITERAL_BUG(__s)
   1.572 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.573 +    size_type __old_capacity = capacity();
   1.574 +    _M_non_dbg_impl.replace(__pos, __n1, __s);
   1.575 +    _Compare_Capacity(__old_capacity);
   1.576 +    return *this;
   1.577 +  }
   1.578 +
   1.579 +  _Self& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) {
   1.580 +    size_type __old_capacity = capacity();
   1.581 +    _M_non_dbg_impl.replace(__pos, __n1, __n2, __c);
   1.582 +    _Compare_Capacity(__old_capacity);
   1.583 +    return *this;
   1.584 +  }
   1.585 +
   1.586 +  _Self& replace(iterator __f, iterator __l, const _Self& __s) {
   1.587 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
   1.588 +    size_type __old_capacity = capacity();
   1.589 +    _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __s._M_non_dbg_impl);
   1.590 +    _Compare_Capacity(__old_capacity);
   1.591 +    return *this;
   1.592 +  }
   1.593 +
   1.594 +  _Self& replace(iterator __f, iterator __l, const _CharT* __s, size_type __n) {
   1.595 +    _STLP_FIX_LITERAL_BUG(__s)
   1.596 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
   1.597 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.598 +    size_type __old_capacity = capacity();
   1.599 +    _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __s, __n);
   1.600 +    _Compare_Capacity(__old_capacity);
   1.601 +    return *this;
   1.602 +  }
   1.603 +
   1.604 +  _Self& replace(iterator __f, iterator __l, const _CharT* __s) {
   1.605 +    _STLP_FIX_LITERAL_BUG(__s)
   1.606 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
   1.607 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.608 +    size_type __old_capacity = capacity();
   1.609 +    _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __s);
   1.610 +    _Compare_Capacity(__old_capacity);
   1.611 +    return *this;
   1.612 +  }
   1.613 +
   1.614 +  _Self& replace(iterator __f, iterator __l, size_type __n, _CharT __c) {
   1.615 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
   1.616 +    size_type __old_capacity = capacity();
   1.617 +    _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __n, __c);
   1.618 +    _Compare_Capacity(__old_capacity);
   1.619 +    return *this;
   1.620 +  }
   1.621 +
   1.622 +#if defined (_STLP_MEMBER_TEMPLATES)
   1.623 +private:
   1.624 +  template <class _RandomIter>
   1.625 +  void _M_replace_aux(iterator __first, iterator __last,
   1.626 +                      _RandomIter __f, _RandomIter __l, __true_type const& /*_IsIterator*/)
   1.627 +  { _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator, __f._M_iterator, __l._M_iterator); }
   1.628 +
   1.629 +  template <class _InputIter>
   1.630 +  void _M_replace_aux(iterator __first, iterator __last,
   1.631 +                      _InputIter __f, _InputIter __l, __false_type const& /*_IsIterator*/) {
   1.632 +    _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator,
   1.633 +                            _STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l));
   1.634 +  }
   1.635 +
   1.636 +public:
   1.637 +  template <class _InputIter>
   1.638 +  _Self& replace(iterator __first, iterator __last,
   1.639 +                 _InputIter __f, _InputIter __l) {
   1.640 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
   1.641 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
   1.642 +
   1.643 +    /* See insert comment for reson of iterator detection.
   1.644 +     */
   1.645 +    typedef typename _AreSameUnCVTypes<_InputIter, iterator>::_Ret _IsNonConstIterator;
   1.646 +    typedef typename _AreSameUnCVTypes<_InputIter, const_iterator>::_Ret _IsConstIterator;
   1.647 +    typedef typename _Lor2<_IsNonConstIterator, _IsConstIterator>::_Ret _IsIterator;
   1.648 +
   1.649 +    size_type __old_capacity = capacity();
   1.650 +    _M_replace_aux(__first, __last, __f, __l, _IsIterator());
   1.651 +    _Compare_Capacity(__old_capacity);
   1.652 +    return *this;
   1.653 +  }
   1.654 +#endif
   1.655 +
   1.656 +#if !defined (_STLP_MEMBER_TEMPLATES) || \
   1.657 +    !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
   1.658 +  _Self& replace(iterator __first, iterator __last,
   1.659 +                 const_iterator __f, const_iterator __l) {
   1.660 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
   1.661 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
   1.662 +    size_type __old_capacity = capacity();
   1.663 +    _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator,
   1.664 +                            __f._M_iterator, __l._M_iterator);
   1.665 +    _Compare_Capacity(__old_capacity);
   1.666 +    return *this;
   1.667 +  }
   1.668 +
   1.669 +  _Self& replace(iterator __first, iterator __last,
   1.670 +                 const _CharT* __f, const _CharT* __l) {
   1.671 +    _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
   1.672 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
   1.673 +    _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
   1.674 +    size_type __old_capacity = capacity();
   1.675 +    _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator, __f, __l);
   1.676 +    _Compare_Capacity(__old_capacity);
   1.677 +    return *this;
   1.678 +  }
   1.679 +#endif
   1.680 +
   1.681 +  // Other modifier member functions.
   1.682 +  void swap(_Self& __s) {
   1.683 +    _M_iter_list._Swap_owners(__s._M_iter_list);
   1.684 +    _M_non_dbg_impl.swap(__s._M_non_dbg_impl);
   1.685 +  }
   1.686 +
   1.687 +  int compare(const _Self& __s) const
   1.688 +  { return _M_non_dbg_impl.compare(__s._M_non_dbg_impl); }
   1.689 +  int compare(size_type __pos, size_type __n, const _Self& __s) const
   1.690 +  { return _M_non_dbg_impl.compare(__pos, __n, __s._M_non_dbg_impl); }
   1.691 +  int compare(size_type __pos1, size_type __n1, const _Self& __s,
   1.692 +              size_type __pos2, size_type __n2) const
   1.693 +  { return _M_non_dbg_impl.compare(__pos1, __n1, __s._M_non_dbg_impl, __pos2, __n2); }
   1.694 +  int compare(const _CharT* __s) const {
   1.695 +    _STLP_FIX_LITERAL_BUG(__s)
   1.696 +    return _M_non_dbg_impl.compare(__s);
   1.697 +  }
   1.698 +  int compare(size_type __pos, size_type __n, const _CharT* __s) const {
   1.699 +    _STLP_FIX_LITERAL_BUG(__s)
   1.700 +    return _M_non_dbg_impl.compare(__pos, __n, __s);
   1.701 +  }
   1.702 +  int compare(size_type __pos1, size_type __n1, const _CharT* __s,
   1.703 +              size_type __n2) const {
   1.704 +    _STLP_FIX_LITERAL_BUG(__s)
   1.705 +    return _M_non_dbg_impl.compare(__pos1, __n1, __s, __n2);
   1.706 +  }
   1.707 +
   1.708 +  // Helper functions for compare.
   1.709 +  static int _STLP_CALL _M_compare(const _CharT* __f1, const _CharT* __l1,
   1.710 +                                   const _CharT* __f2, const _CharT* __l2)
   1.711 +  { return _Base::_M_compare(__f1, __l1, __f2, __l2); }
   1.712 +  static int _STLP_CALL _M_compare(const_iterator __f1, const_iterator __l1,
   1.713 +                                   const _CharT* __f2, const _CharT* __l2)
   1.714 +  { return _Base::_M_compare(__f1._M_iterator, __l1._M_iterator, __f2, __l2); }
   1.715 +  static int _STLP_CALL _M_compare(const _CharT* __f1, const _CharT* __l1,
   1.716 +                                   const_iterator __f2, const_iterator __l2)
   1.717 +  { return _Base::_M_compare(__f1, __l1, __f2._M_iterator, __l2._M_iterator); }
   1.718 +  static int _STLP_CALL _M_compare(const_iterator __f1, const_iterator __l1,
   1.719 +                                   const_iterator __f2, const_iterator __l2)
   1.720 +  { return _Base::_M_compare(__f1._M_iterator, __l1._M_iterator, __f2._M_iterator, __l2._M_iterator); }
   1.721 +
   1.722 +  const _CharT* c_str() const { return _M_non_dbg_impl.c_str(); }
   1.723 +  const _CharT* data()  const { return _M_non_dbg_impl.data(); }
   1.724 +
   1.725 +  size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
   1.726 +  { return _M_non_dbg_impl.copy(__s, __n, __pos); }
   1.727 +
   1.728 +  // find.
   1.729 +  size_type find(const _Self& __s, size_type __pos = 0) const
   1.730 +  { return _M_non_dbg_impl.find(__s._M_non_dbg_impl, __pos); }
   1.731 +  size_type find(const _CharT* __s, size_type __pos = 0) const {
   1.732 +    _STLP_FIX_LITERAL_BUG(__s)
   1.733 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.734 +    return _M_non_dbg_impl.find(__s, __pos);
   1.735 +  }
   1.736 +  size_type find(const _CharT* __s, size_type __pos, size_type __n) const {
   1.737 +    _STLP_FIX_LITERAL_BUG(__s)
   1.738 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.739 +    return _M_non_dbg_impl.find(__s, __pos, __n);
   1.740 +  }
   1.741 +  // WIE: Versant schema compiler 5.2.2 ICE workaround
   1.742 +  size_type find(_CharT __c) const { return find(__c, 0); }
   1.743 +  size_type find(_CharT __c, size_type __pos /* = 0 */) const
   1.744 +  { return _M_non_dbg_impl.find(__c, __pos); }
   1.745 +
   1.746 +  // rfind.
   1.747 +  size_type rfind(const _Self& __s, size_type __pos = npos) const
   1.748 +  { return _M_non_dbg_impl.rfind(__s._M_non_dbg_impl, __pos); }
   1.749 +  size_type rfind(const _CharT* __s, size_type __pos = npos) const {
   1.750 +    _STLP_FIX_LITERAL_BUG(__s)
   1.751 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.752 +    return _M_non_dbg_impl.rfind(__s, __pos);
   1.753 +  }
   1.754 +  size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const {
   1.755 +    _STLP_FIX_LITERAL_BUG(__s)
   1.756 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.757 +    return _M_non_dbg_impl.rfind(__s, __pos, __n);
   1.758 +  }
   1.759 +  size_type rfind(_CharT __c, size_type __pos = npos) const
   1.760 +  { return _M_non_dbg_impl.rfind(__c, __pos); }
   1.761 +
   1.762 +  // find_first_of
   1.763 +  size_type find_first_of(const _Self& __s, size_type __pos = 0) const
   1.764 +  { return _M_non_dbg_impl.find_first_of(__s._M_non_dbg_impl, __pos); }
   1.765 +  size_type find_first_of(const _CharT* __s, size_type __pos = 0) const {
   1.766 +    _STLP_FIX_LITERAL_BUG(__s)
   1.767 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.768 +    return _M_non_dbg_impl.find_first_of(__s, __pos);
   1.769 +  }
   1.770 +  size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const {
   1.771 +    _STLP_FIX_LITERAL_BUG(__s)
   1.772 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.773 +    return _M_non_dbg_impl.find_first_of(__s, __pos, __n);
   1.774 +  }
   1.775 +  size_type find_first_of(_CharT __c, size_type __pos = 0) const
   1.776 +  { return _M_non_dbg_impl.find_first_of(__c, __pos); }
   1.777 +
   1.778 +  // find_last_of
   1.779 +  size_type find_last_of(const _Self& __s, size_type __pos = npos) const
   1.780 +  { return _M_non_dbg_impl.find_last_of(__s._M_non_dbg_impl, __pos); }
   1.781 +  size_type find_last_of(const _CharT* __s, size_type __pos = npos) const {
   1.782 +    _STLP_FIX_LITERAL_BUG(__s)
   1.783 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.784 +    return _M_non_dbg_impl.find_last_of(__s, __pos);
   1.785 +  }
   1.786 +  size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const {
   1.787 +    _STLP_FIX_LITERAL_BUG(__s)
   1.788 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.789 +    return _M_non_dbg_impl.find_last_of(__s, __pos, __n);
   1.790 +  }
   1.791 +  size_type find_last_of(_CharT __c, size_type __pos = npos) const
   1.792 +  { return _M_non_dbg_impl.rfind(__c, __pos); }
   1.793 +
   1.794 +  // find_first_not_of
   1.795 +  size_type find_first_not_of(const _Self& __s, size_type __pos = 0) const
   1.796 +  { return _M_non_dbg_impl.find_first_not_of(__s._M_non_dbg_impl, __pos); }
   1.797 +  size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const {
   1.798 +    _STLP_FIX_LITERAL_BUG(__s)
   1.799 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.800 +    return _M_non_dbg_impl.find_first_not_of(__s, __pos);
   1.801 +  }
   1.802 +  size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const {
   1.803 +    _STLP_FIX_LITERAL_BUG(__s)
   1.804 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.805 +    return _M_non_dbg_impl.find_first_not_of(__s, __pos, __n);
   1.806 +  }
   1.807 +  size_type find_first_not_of(_CharT __c, size_type __pos = 0) const
   1.808 +  { return _M_non_dbg_impl.find_first_not_of(__c, __pos); }
   1.809 +
   1.810 +  // find_last_not_of
   1.811 +  size_type find_last_not_of(const _Self& __s, size_type __pos = npos) const
   1.812 +  { return _M_non_dbg_impl.find_last_not_of(__s._M_non_dbg_impl, __pos); }
   1.813 +  size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const {
   1.814 +    _STLP_FIX_LITERAL_BUG(__s)
   1.815 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.816 +    return _M_non_dbg_impl.find_last_not_of(__s, __pos);
   1.817 +  }
   1.818 +  size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const {
   1.819 +    _STLP_FIX_LITERAL_BUG(__s)
   1.820 +    _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
   1.821 +    return _M_non_dbg_impl.find_last_not_of(__s, __pos, __n);
   1.822 +  }
   1.823 +  size_type find_last_not_of(_CharT __c, size_type __pos = npos) const
   1.824 +  { return _M_non_dbg_impl.find_last_not_of(__c, __pos); }
   1.825 +
   1.826 +#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
   1.827 +#  include <stl/debug/_string_sum_methods.h>
   1.828 +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
   1.829 +};
   1.830 +
   1.831 +// This is a hook to instantiate STLport exports in a designated DLL
   1.832 +#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
   1.833 +_STLP_MOVE_TO_PRIV_NAMESPACE
   1.834 +_STLP_EXPORT_TEMPLATE_CLASS _STLP_CONSTRUCT_CHECKER<_STLP_NON_DBG_STRING_NAME <char, char_traits<char>, allocator<char> > >;
   1.835 +_STLP_MOVE_TO_STD_NAMESPACE
   1.836 +_STLP_EXPORT_TEMPLATE_CLASS basic_string<char, char_traits<char>, allocator<char> >;
   1.837 +#  if defined (_STLP_HAS_WCHAR_T)
   1.838 +_STLP_MOVE_TO_PRIV_NAMESPACE
   1.839 +_STLP_EXPORT_TEMPLATE_CLASS _STLP_CONSTRUCT_CHECKER<_STLP_NON_DBG_STRING_NAME <wchar_t, char_traits<wchar_t>, allocator<wchar_t> > >;
   1.840 +_STLP_MOVE_TO_STD_NAMESPACE
   1.841 +_STLP_EXPORT_TEMPLATE_CLASS basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
   1.842 +#  endif
   1.843 +#endif /* _STLP_USE_TEMPLATE_EXPORT */
   1.844 +
   1.845 +#undef _STLP_NON_DBG_STRING
   1.846 +#undef _STLP_NON_DBG_STRING_NAME
   1.847 +
   1.848 +#if !defined (_STLP_STATIC_CONST_INIT_BUG)
   1.849 +#  if defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96)
   1.850 +template <class _CharT, class _Traits, class _Alloc>
   1.851 +const size_t basic_string<_CharT, _Traits, _Alloc>::npos = ~(size_t) 0;
   1.852 +#  else
   1.853 +template <class _CharT, class _Traits, class _Alloc>
   1.854 +const size_t basic_string<_CharT, _Traits, _Alloc>::npos;
   1.855 +#  endif
   1.856 +#endif
   1.857 +
   1.858 +#if defined (basic_string)
   1.859 +_STLP_MOVE_TO_STD_NAMESPACE
   1.860 +#undef basic_string
   1.861 +#endif
   1.862 +
   1.863 +_STLP_END_NAMESPACE
   1.864 +
   1.865 +#endif /* _STLP_DBG_STRING */
   1.866 +
   1.867 +// Local Variables:
   1.868 +// mode:C++
   1.869 +// End: