/home/ntakagi/work/STLport-5.1.5/stlport/stl/_deque.hGo to the documentation of this file.00001 /* 00002 * 00003 * Copyright (c) 1994 00004 * Hewlett-Packard Company 00005 * 00006 * Copyright (c) 1996,1997 00007 * Silicon Graphics Computer Systems, Inc. 00008 * 00009 * Copyright (c) 1997 00010 * Moscow Center for SPARC Technology 00011 * 00012 * Copyright (c) 1999 00013 * Boris Fomitchev 00014 * 00015 * This material is provided "as is", with absolutely no warranty expressed 00016 * or implied. Any use is at your own risk. 00017 * 00018 * Permission to use or copy this software for any purpose is hereby granted 00019 * without fee, provided the above notices are retained on all copies. 00020 * Permission to modify the code and to distribute modified code is granted, 00021 * provided the above notices are retained, and a notice that the code was 00022 * modified is included with the above copyright notice. 00023 * 00024 */ 00025 00026 /* NOTE: This is an internal header file, included by other STL headers. 00027 * You should not attempt to use it directly. 00028 */ 00029 00030 #ifndef _STLP_INTERNAL_DEQUE_H 00031 #define _STLP_INTERNAL_DEQUE_H 00032 00033 #ifndef _STLP_INTERNAL_ALGOBASE_H 00034 # include <stl/_algobase.h> 00035 #endif 00036 00037 #ifndef _STLP_INTERNAL_ALLOC_H 00038 # include <stl/_alloc.h> 00039 #endif 00040 00041 #ifndef _STLP_INTERNAL_ITERATOR_H 00042 # include <stl/_iterator.h> 00043 #endif 00044 00045 #ifndef _STLP_INTERNAL_UNINITIALIZED_H 00046 # include <stl/_uninitialized.h> 00047 #endif 00048 00049 #ifndef _STLP_RANGE_ERRORS_H 00050 # include <stl/_range_errors.h> 00051 #endif 00052 00053 /* Class invariants: 00054 * For any nonsingular iterator i: 00055 * i.node is the address of an element in the map array. The 00056 * contents of i.node is a pointer to the beginning of a node. 00057 * i.first == *(i.node) 00058 * i.last == i.first + node_size 00059 * i.cur is a pointer in the range [i.first, i.last). NOTE: 00060 * the implication of this is that i.cur is always a dereferenceable 00061 * pointer, even if i is a past-the-end iterator. 00062 * Start and Finish are always nonsingular iterators. NOTE: this means 00063 * that an empty deque must have one node, and that a deque 00064 * with N elements, where N is the buffer size, must have two nodes. 00065 * For every node other than start.node and finish.node, every element 00066 * in the node is an initialized object. If start.node == finish.node, 00067 * then [start.cur, finish.cur) are initialized objects, and 00068 * the elements outside that range are uninitialized storage. Otherwise, 00069 * [start.cur, start.last) and [finish.first, finish.cur) are initialized 00070 * objects, and [start.first, start.cur) and [finish.cur, finish.last) 00071 * are uninitialized storage. 00072 * [map, map + map_size) is a valid, non-empty range. 00073 * [start.node, finish.node] is a valid range contained within 00074 * [map, map + map_size). 00075 * A pointer in the range [map, map + map_size) points to an allocated node 00076 * if and only if the pointer is in the range [start.node, finish.node]. 00077 */ 00078 00079 _STLP_BEGIN_NAMESPACE 00080 00081 _STLP_MOVE_TO_PRIV_NAMESPACE 00082 00083 template <class _Tp> 00084 struct _Deque_iterator_base { 00085 00086 enum _Constants { 00087 _blocksize = _MAX_BYTES, 00088 __buffer_size = (sizeof(_Tp) < (size_t)_blocksize ? 00089 ( (size_t)_blocksize / sizeof(_Tp)) : size_t(1)) 00090 }; 00091 00092 typedef random_access_iterator_tag iterator_category; 00093 00094 typedef _Tp value_type; 00095 typedef size_t size_type; 00096 typedef ptrdiff_t difference_type; 00097 00098 typedef value_type** _Map_pointer; 00099 00100 typedef _Deque_iterator_base< _Tp > _Self; 00101 00102 value_type* _M_cur; 00103 value_type* _M_first; 00104 value_type* _M_last; 00105 _Map_pointer _M_node; 00106 00107 _Deque_iterator_base(value_type* __x, _Map_pointer __y) 00108 : _M_cur(__x), _M_first(*__y), 00109 _M_last(*__y + __buffer_size), _M_node(__y) {} 00110 00111 _Deque_iterator_base() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {} 00112 00113 // see comment in doc/README.evc4 and doc/README.evc8 00114 #if defined (_STLP_MSVC) && (_STLP_MSVC <= 1401) && defined (MIPS) && defined (NDEBUG) 00115 _Deque_iterator_base(_Deque_iterator_base const& __other) 00116 : _M_cur(__other._M_cur), _M_first(__other._M_first), 00117 _M_last(__other._M_last), _M_node(__other._M_node) {} 00118 #endif 00119 00120 difference_type _M_subtract(const _Self& __x) const { 00121 return difference_type(__buffer_size) * (_M_node - __x._M_node - 1) + 00122 (_M_cur - _M_first) + (__x._M_last - __x._M_cur); 00123 } 00124 00125 void _M_increment() { 00126 if (++_M_cur == _M_last) { 00127 _M_set_node(_M_node + 1); 00128 _M_cur = _M_first; 00129 } 00130 } 00131 00132 void _M_decrement() { 00133 if (_M_cur == _M_first) { 00134 _M_set_node(_M_node - 1); 00135 _M_cur = _M_last; 00136 } 00137 --_M_cur; 00138 } 00139 00140 void _M_advance(difference_type __n) { 00141 difference_type __offset = __n + (_M_cur - _M_first); 00142 if (__offset >= 0 && __offset < difference_type(__buffer_size)) 00143 _M_cur += __n; 00144 else { 00145 difference_type __node_offset = 00146 __offset > 0 ? __offset / __buffer_size 00147 : -difference_type((-__offset - 1) / __buffer_size) - 1; 00148 _M_set_node(_M_node + __node_offset); 00149 _M_cur = _M_first + 00150 00151 (__offset - __node_offset * difference_type(__buffer_size)); 00152 } 00153 } 00154 00155 void _M_set_node(_Map_pointer __new_node) { 00156 _M_last = (_M_first = *(_M_node = __new_node)) + difference_type(__buffer_size); 00157 } 00158 }; 00159 00160 00161 template <class _Tp, class _Traits> 00162 struct _Deque_iterator : public _Deque_iterator_base< _Tp> { 00163 typedef random_access_iterator_tag iterator_category; 00164 typedef _Tp value_type; 00165 typedef typename _Traits::reference reference; 00166 typedef typename _Traits::pointer pointer; 00167 typedef size_t size_type; 00168 typedef ptrdiff_t difference_type; 00169 typedef value_type** _Map_pointer; 00170 00171 typedef _Deque_iterator_base< _Tp > _Base; 00172 typedef _Deque_iterator<_Tp, _Traits> _Self; 00173 typedef typename _Traits::_NonConstTraits _NonConstTraits; 00174 typedef _Deque_iterator<_Tp, _NonConstTraits> iterator; 00175 typedef typename _Traits::_ConstTraits _ConstTraits; 00176 typedef _Deque_iterator<_Tp, _ConstTraits> const_iterator; 00177 00178 _Deque_iterator(value_type* __x, _Map_pointer __y) : 00179 _Deque_iterator_base<value_type>(__x,__y) {} 00180 00181 _Deque_iterator() {} 00182 //copy constructor for iterator and constructor from iterator for const_iterator 00183 _Deque_iterator(const iterator& __x) : 00184 _Deque_iterator_base<value_type>(__x) {} 00185 00186 reference operator*() const { 00187 return *this->_M_cur; 00188 } 00189 00190 _STLP_DEFINE_ARROW_OPERATOR 00191 00192 difference_type operator-(const const_iterator& __x) const { return this->_M_subtract(__x); } 00193 00194 _Self& operator++() { this->_M_increment(); return *this; } 00195 _Self operator++(int) { 00196 _Self __tmp = *this; 00197 ++*this; 00198 return __tmp; 00199 } 00200 00201 _Self& operator--() { this->_M_decrement(); return *this; } 00202 _Self operator--(int) { 00203 _Self __tmp = *this; 00204 --*this; 00205 return __tmp; 00206 } 00207 00208 _Self& operator+=(difference_type __n) { this->_M_advance(__n); return *this; } 00209 _Self operator+(difference_type __n) const { 00210 _Self __tmp = *this; 00211 return __tmp += __n; 00212 } 00213 00214 _Self& operator-=(difference_type __n) { return *this += -__n; } 00215 _Self operator-(difference_type __n) const { 00216 _Self __tmp = *this; 00217 return __tmp -= __n; 00218 } 00219 00220 reference operator[](difference_type __n) const { return *(*this + __n); } 00221 }; 00222 00223 00224 template <class _Tp, class _Traits> 00225 inline _Deque_iterator<_Tp, _Traits> _STLP_CALL 00226 operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Traits>& __x) 00227 { return __x + __n; } 00228 00229 00230 #if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) 00231 template <class _Tp> 00232 inline bool _STLP_CALL 00233 operator==(const _Deque_iterator_base<_Tp >& __x, 00234 const _Deque_iterator_base<_Tp >& __y) 00235 { return __x._M_cur == __y._M_cur; } 00236 00237 template <class _Tp> 00238 inline bool _STLP_CALL 00239 operator < (const _Deque_iterator_base<_Tp >& __x, 00240 const _Deque_iterator_base<_Tp >& __y) { 00241 return (__x._M_node == __y._M_node) ? 00242 (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); 00243 } 00244 00245 template <class _Tp> 00246 inline bool _STLP_CALL 00247 operator!=(const _Deque_iterator_base<_Tp >& __x, 00248 const _Deque_iterator_base<_Tp >& __y) 00249 { return __x._M_cur != __y._M_cur; } 00250 00251 template <class _Tp> 00252 inline bool _STLP_CALL 00253 operator>(const _Deque_iterator_base<_Tp >& __x, 00254 const _Deque_iterator_base<_Tp >& __y) 00255 { return __y < __x; } 00256 00257 template <class _Tp> 00258 inline bool _STLP_CALL operator>=(const _Deque_iterator_base<_Tp >& __x, 00259 const _Deque_iterator_base<_Tp >& __y) 00260 { return !(__x < __y); } 00261 00262 template <class _Tp> 00263 inline bool _STLP_CALL operator<=(const _Deque_iterator_base<_Tp >& __x, 00264 const _Deque_iterator_base<_Tp >& __y) 00265 { return !(__y < __x); } 00266 00267 #else /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ 00268 00269 template <class _Tp, class _Traits1, class _Traits2> 00270 inline bool _STLP_CALL 00271 operator==(const _Deque_iterator<_Tp, _Traits1 >& __x, 00272 const _Deque_iterator<_Tp, _Traits2 >& __y) 00273 { return __x._M_cur == __y._M_cur; } 00274 00275 template <class _Tp, class _Traits1, class _Traits2> 00276 inline bool _STLP_CALL 00277 operator < (const _Deque_iterator<_Tp, _Traits1 >& __x, 00278 const _Deque_iterator<_Tp, _Traits2 >& __y) { 00279 return (__x._M_node == __y._M_node) ? 00280 (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); 00281 } 00282 00283 template <class _Tp> 00284 inline bool _STLP_CALL 00285 operator!=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x, 00286 const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) 00287 { return __x._M_cur != __y._M_cur; } 00288 00289 template <class _Tp> 00290 inline bool _STLP_CALL 00291 operator>(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x, 00292 const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) 00293 { return __y < __x; } 00294 00295 template <class _Tp> 00296 inline bool _STLP_CALL 00297 operator>=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x, 00298 const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) 00299 { return !(__x < __y); } 00300 00301 template <class _Tp> 00302 inline bool _STLP_CALL 00303 operator<=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x, 00304 const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) 00305 { return !(__y < __x); } 00306 #endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ 00307 00308 #if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 00309 _STLP_MOVE_TO_STD_NAMESPACE 00310 template <class _Tp, class _Traits> 00311 struct __type_traits<_STLP_PRIV _Deque_iterator<_Tp, _Traits> > { 00312 typedef __false_type has_trivial_default_constructor; 00313 typedef __true_type has_trivial_copy_constructor; 00314 typedef __true_type has_trivial_assignment_operator; 00315 typedef __true_type has_trivial_destructor; 00316 typedef __false_type is_POD_type; 00317 }; 00318 _STLP_MOVE_TO_PRIV_NAMESPACE 00319 #endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ 00320 00321 #if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES) 00322 _STLP_MOVE_TO_STD_NAMESPACE 00323 template <class _Tp, class _Traits> inline _Tp* _STLP_CALL 00324 value_type(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return (_Tp*)0; } 00325 template <class _Tp, class _Traits> inline random_access_iterator_tag _STLP_CALL 00326 iterator_category(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return random_access_iterator_tag(); } 00327 template <class _Tp, class _Traits> inline ptrdiff_t* _STLP_CALL 00328 distance_type(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return 0; } 00329 _STLP_MOVE_TO_PRIV_NAMESPACE 00330 #endif 00331 00332 /* Deque base class. It has two purposes. First, its constructor 00333 * and destructor allocate (but don't initialize) storage. This makes 00334 * exception safety easier. Second, the base class encapsulates all of 00335 * the differences between SGI-style allocators and standard-conforming 00336 * allocators. 00337 */ 00338 00339 template <class _Tp, class _Alloc> 00340 class _Deque_base { 00341 typedef _Deque_base<_Tp, _Alloc> _Self; 00342 public: 00343 typedef _Tp value_type; 00344 _STLP_FORCE_ALLOCATORS(_Tp, _Alloc) 00345 typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type; 00346 typedef _STLP_alloc_proxy<size_t, value_type, allocator_type> _Alloc_proxy; 00347 00348 typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type _Map_alloc_type; 00349 typedef _STLP_alloc_proxy<value_type**, value_type*, _Map_alloc_type> _Map_alloc_proxy; 00350 00351 typedef _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > iterator; 00352 typedef _Deque_iterator<_Tp, _Const_traits<_Tp> > const_iterator; 00353 00354 static size_t _STLP_CALL buffer_size() { return (size_t)_Deque_iterator_base<_Tp>::__buffer_size; } 00355 00356 _Deque_base(const allocator_type& __a, size_t __num_elements) 00357 : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0), 00358 _M_map_size(__a, (size_t)0) 00359 { _M_initialize_map(__num_elements); } 00360 00361 _Deque_base(const allocator_type& __a) 00362 : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0), 00363 _M_map_size(__a, (size_t)0) {} 00364 00365 _Deque_base(__move_source<_Self> src) 00366 : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish), 00367 _M_map(__move_source<_Map_alloc_proxy>(src.get()._M_map)), 00368 _M_map_size(__move_source<_Alloc_proxy>(src.get()._M_map_size)) { 00369 src.get()._M_map._M_data = 0; 00370 src.get()._M_map_size._M_data = 0; 00371 src.get()._M_finish = src.get()._M_start; 00372 } 00373 00374 ~_Deque_base(); 00375 00376 protected: 00377 void _M_initialize_map(size_t); 00378 void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); 00379 void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); 00380 enum { _S_initial_map_size = 8 }; 00381 00382 protected: 00383 iterator _M_start; 00384 iterator _M_finish; 00385 _Map_alloc_proxy _M_map; 00386 _Alloc_proxy _M_map_size; 00387 }; 00388 00389 #if defined (_STLP_USE_PTR_SPECIALIZATIONS) 00390 # define deque _STLP_PTR_IMPL_NAME(deque) 00391 #elif defined (_STLP_DEBUG) 00392 # define deque _STLP_NON_DBG_NAME(deque) 00393 #else 00394 _STLP_MOVE_TO_STD_NAMESPACE 00395 #endif 00396 00397 template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) > 00398 class deque : protected _STLP_PRIV _Deque_base<_Tp, _Alloc> 00399 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (deque) 00400 , public __stlport_class<deque<_Tp, _Alloc> > 00401 #endif 00402 { 00403 typedef _STLP_PRIV _Deque_base<_Tp, _Alloc> _Base; 00404 typedef deque<_Tp, _Alloc> _Self; 00405 public: // Basic types 00406 typedef _Tp value_type; 00407 typedef value_type* pointer; 00408 typedef const value_type* const_pointer; 00409 typedef value_type& reference; 00410 typedef const value_type& const_reference; 00411 typedef size_t size_type; 00412 typedef ptrdiff_t difference_type; 00413 typedef random_access_iterator_tag _Iterator_category; 00414 _STLP_FORCE_ALLOCATORS(_Tp, _Alloc) 00415 typedef typename _Base::allocator_type allocator_type; 00416 00417 public: // Iterators 00418 typedef typename _Base::iterator iterator; 00419 typedef typename _Base::const_iterator const_iterator; 00420 00421 _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS; 00422 00423 protected: // Internal typedefs 00424 typedef pointer* _Map_pointer; 00425 typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialAss; 00426 typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialCpy; 00427 typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit; 00428 #if !defined (_STLP_NO_MOVE_SEMANTIC) 00429 typedef typename __move_traits<_Tp>::implemented _Movable; 00430 #else 00431 typedef __false_type _Movable; 00432 #endif 00433 00434 public: // Basic accessors 00435 iterator begin() { return this->_M_start; } 00436 iterator end() { return this->_M_finish; } 00437 const_iterator begin() const { return const_iterator(this->_M_start); } 00438 const_iterator end() const { return const_iterator(this->_M_finish); } 00439 00440 reverse_iterator rbegin() { return reverse_iterator(this->_M_finish); } 00441 reverse_iterator rend() { return reverse_iterator(this->_M_start); } 00442 const_reverse_iterator rbegin() const 00443 { return const_reverse_iterator(this->_M_finish); } 00444 const_reverse_iterator rend() const 00445 { return const_reverse_iterator(this->_M_start); } 00446 00447 reference operator[](size_type __n) 00448 { return this->_M_start[difference_type(__n)]; } 00449 const_reference operator[](size_type __n) const 00450 { return this->_M_start[difference_type(__n)]; } 00451 00452 void _M_range_check(size_type __n) const { 00453 if (__n >= this->size()) 00454 __stl_throw_out_of_range("deque"); 00455 } 00456 reference at(size_type __n) 00457 { _M_range_check(__n); return (*this)[__n]; } 00458 const_reference at(size_type __n) const 00459 { _M_range_check(__n); return (*this)[__n]; } 00460 00461 reference front() { return *this->_M_start; } 00462 reference back() { 00463 iterator __tmp = this->_M_finish; 00464 --__tmp; 00465 return *__tmp; 00466 } 00467 const_reference front() const { return *this->_M_start; } 00468 const_reference back() const { 00469 const_iterator __tmp = this->_M_finish; 00470 --__tmp; 00471 return *__tmp; 00472 } 00473 00474 size_type size() const { return this->_M_finish - this->_M_start; } 00475 size_type max_size() const { return size_type(-1); } 00476 bool empty() const { return this->_M_finish == this->_M_start; } 00477 allocator_type get_allocator() const { return this->_M_map_size; } 00478 00479 public: // Constructor, destructor. 00480 #if !defined (_STLP_DONT_SUP_DFLT_PARAM) 00481 explicit deque(const allocator_type& __a = allocator_type()) 00482 #else 00483 deque() 00484 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), 0) {} 00485 deque(const allocator_type& __a) 00486 #endif 00487 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, 0) {} 00488 00489 deque(const _Self& __x) 00490 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__x.get_allocator(), __x.size()) 00491 { _STLP_PRIV __ucopy(__x.begin(), __x.end(), this->_M_start); } 00492 00493 #if !defined (_STLP_DONT_SUP_DFLT_PARAM) 00494 private: 00495 void _M_initialize(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(_Tp)) 00496 { _M_fill_initialize(__val, _TrivialInit()); } 00497 public: 00498 explicit deque(size_type __n) 00499 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n) 00500 { _M_initialize(__n); } 00501 deque(size_type __n, const value_type& __val, const allocator_type& __a = allocator_type()) 00502 #else 00503 explicit deque(size_type __n) 00504 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n) 00505 { _M_fill_initialize(_STLP_DEFAULT_CONSTRUCTED(_Tp), _TrivialInit()); } 00506 deque(size_type __n, const value_type& __val) 00507 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n) 00508 { _M_fill_initialize(__val, __false_type()); } 00509 deque(size_type __n, const value_type& __val, const allocator_type& __a) 00510 #endif 00511 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __n) 00512 { _M_fill_initialize(__val, __false_type()); } 00513 00514 #if defined (_STLP_MEMBER_TEMPLATES) 00515 protected: 00516 template <class _Integer> 00517 void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) { 00518 this->_M_initialize_map(__n); 00519 _M_fill_initialize(__x, __false_type()); 00520 } 00521 00522 template <class _InputIter> 00523 void _M_initialize_dispatch(_InputIter __first, _InputIter __last, 00524 const __false_type&) { 00525 _M_range_initialize(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); 00526 } 00527 00528 public: 00529 // Check whether it's an integral type. If so, it's not an iterator. 00530 template <class _InputIterator> 00531 deque(_InputIterator __first, _InputIterator __last, 00532 const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) 00533 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a) { 00534 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral; 00535 _M_initialize_dispatch(__first, __last, _Integral()); 00536 } 00537 00538 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) 00539 template <class _InputIterator> 00540 deque(_InputIterator __first, _InputIterator __last) 00541 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type()) { 00542 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral; 00543 _M_initialize_dispatch(__first, __last, _Integral()); 00544 } 00545 # endif 00546 00547 #else 00548 deque(const value_type* __first, const value_type* __last, 00549 const allocator_type& __a = allocator_type() ) 00550 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __last - __first) 00551 { _STLP_PRIV __ucopy(__first, __last, this->_M_start); } 00552 00553 deque(const_iterator __first, const_iterator __last, 00554 const allocator_type& __a = allocator_type() ) 00555 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __last - __first) 00556 { _STLP_PRIV __ucopy(__first, __last, this->_M_start); } 00557 #endif /* _STLP_MEMBER_TEMPLATES */ 00558 00559 deque(__move_source<_Self> src) 00560 : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__move_source<_Base>(src.get())) 00561 {} 00562 00563 ~deque() 00564 { _STLP_STD::_Destroy_Range(this->_M_start, this->_M_finish); } 00565 00566 _Self& operator= (const _Self& __x); 00567 00568 void swap(_Self& __x) { 00569 _STLP_STD::swap(this->_M_start, __x._M_start); 00570 _STLP_STD::swap(this->_M_finish, __x._M_finish); 00571 this->_M_map.swap(__x._M_map); 00572 this->_M_map_size.swap(__x._M_map_size); 00573 } 00574 00575 public: 00576 // assign(), a generalized assignment member function. Two 00577 // versions: one that takes a count, and one that takes a range. 00578 // The range version is a member template, so we dispatch on whether 00579 // or not the type is an integer. 00580 00581 void _M_fill_assign(size_type __n, const _Tp& __val) { 00582 if (__n > size()) { 00583 _STLP_STD::fill(begin(), end(), __val); 00584 insert(end(), __n - size(), __val); 00585 } 00586 else { 00587 erase(begin() + __n, end()); 00588 _STLP_STD::fill(begin(), end(), __val); 00589 } 00590 } 00591 00592 void assign(size_type __n, const _Tp& __val) { 00593 _M_fill_assign(__n, __val); 00594 } 00595 00596 #if defined (_STLP_MEMBER_TEMPLATES) 00597 template <class _InputIterator> 00598 void assign(_InputIterator __first, _InputIterator __last) { 00599 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral; 00600 _M_assign_dispatch(__first, __last, _Integral()); 00601 } 00602 00603 private: // helper functions for assign() 00604 00605 template <class _Integer> 00606 void _M_assign_dispatch(_Integer __n, _Integer __val, 00607 const __true_type& /*_IsIntegral*/) 00608 { _M_fill_assign((size_type) __n, (_Tp) __val); } 00609 00610 template <class _InputIterator> 00611 void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 00612 const __false_type& /*_IsIntegral*/) { 00613 _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); 00614 } 00615 00616 template <class _InputIter> 00617 void _M_assign_aux(_InputIter __first, _InputIter __last, const input_iterator_tag &) { 00618 iterator __cur = begin(); 00619 for ( ; __first != __last && __cur != end(); ++__cur, ++__first) 00620 *__cur = *__first; 00621 if (__first == __last) 00622 erase(__cur, end()); 00623 else 00624 insert(end(), __first, __last); 00625 } 00626 00627 template <class _ForwardIterator> 00628 void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 00629 const forward_iterator_tag &) { 00630 #else 00631 void assign(const value_type *__first, const value_type *__last) { 00632 size_type __size = size(); 00633 size_type __len = __last - __first; 00634 if (__len > __size) { 00635 const value_type *__mid = __first + __size; 00636 copy(__first, __mid, begin()); 00637 insert(end(), __mid, __last); 00638 } 00639 else { 00640 erase(copy(__first, __last, begin()), end()); 00641 } 00642 } 00643 void assign(const_iterator __first, const_iterator __last) { 00644 typedef const_iterator _ForwardIterator; 00645 #endif /* _STLP_MEMBER_TEMPLATES */ 00646 size_type __len = distance(__first, __last); 00647 if (__len > size()) { 00648 _ForwardIterator __mid = __first; 00649 advance(__mid, size()); 00650 copy(__first, __mid, begin()); 00651 insert(end(), __mid, __last); 00652 } 00653 else { 00654 erase(copy(__first, __last, begin()), end()); 00655 } 00656 } 00657 00658 00659 public: // push_* and pop_* 00660 00661 #if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS) 00662 void push_back(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(_Tp)) { 00663 #else 00664 void push_back(const value_type& __t) { 00665 #endif 00666 if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) { 00667 _Copy_Construct(this->_M_finish._M_cur, __t); 00668 ++this->_M_finish._M_cur; 00669 } 00670 else 00671 _M_push_back_aux_v(__t); 00672 } 00673 #if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS) 00674 void push_front(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(_Tp)) { 00675 #else 00676 void push_front(const value_type& __t) { 00677 #endif 00678 if (this->_M_start._M_cur != this->_M_start._M_first) { 00679 _Copy_Construct(this->_M_start._M_cur - 1, __t); 00680 --this->_M_start._M_cur; 00681 } 00682 else 00683 _M_push_front_aux_v(__t); 00684 } 00685 00686 #if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS) 00687 void push_back() { 00688 if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) { 00689 _STLP_STD::_Construct(this->_M_finish._M_cur); 00690 ++this->_M_finish._M_cur; 00691 } 00692 else 00693 _M_push_back_aux(); 00694 } 00695 void push_front() { 00696 if (this->_M_start._M_cur != this->_M_start._M_first) { 00697 _STLP_STD::_Construct(this->_M_start._M_cur - 1); 00698 --this->_M_start._M_cur; 00699 } 00700 else 00701 _M_push_front_aux(); 00702 } 00703 #endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/ 00704 00705 void pop_back() { 00706 if (this->_M_finish._M_cur != this->_M_finish._M_first) { 00707 --this->_M_finish._M_cur; 00708 _STLP_STD::_Destroy(this->_M_finish._M_cur); 00709 } 00710 else { 00711 _M_pop_back_aux(); 00712 _STLP_STD::_Destroy(this->_M_finish._M_cur); 00713 } 00714 } 00715 00716 void pop_front() { 00717 _STLP_STD::_Destroy(this->_M_start._M_cur); 00718 _M_pop_front_aux(); 00719 } 00720 00721 public: // Insert 00722 00723 #if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS) 00724 iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) { 00725 #else 00726 iterator insert(iterator __pos, const value_type& __x) { 00727 #endif 00728 if (__pos._M_cur == this->_M_start._M_cur) { 00729 push_front(__x); 00730 return this->_M_start; 00731 } 00732 else if (__pos._M_cur == this->_M_finish._M_cur) { 00733 push_back(__x); 00734 iterator __tmp = this->_M_finish; 00735 --__tmp; 00736 return __tmp; 00737 } 00738 else { 00739 return _M_fill_insert_aux(__pos, 1, __x, _Movable()); 00740 } 00741 } 00742 00743 #if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS) 00744 iterator insert(iterator __pos) 00745 { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp)); } 00746 #endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/ 00747 00748 void insert(iterator __pos, size_type __n, const value_type& __x) 00749 { _M_fill_insert(__pos, __n, __x); } 00750 00751 protected: 00752 iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type& __x, const __true_type& /*_Movable*/); 00753 iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type& __x, const __false_type& /*_Movable*/); 00754 00755 void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 00756 00757 #if defined (_STLP_MEMBER_TEMPLATES) 00758 template <class _Integer> 00759 void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, 00760 const __true_type& /*_IsIntegral*/) { 00761 _M_fill_insert(__pos, (size_type) __n, (value_type) __x); 00762 } 00763 00764 template <class _InputIterator> 00765 void _M_insert_dispatch(iterator __pos, 00766 _InputIterator __first, _InputIterator __last, 00767 const __false_type& /*_IsIntegral*/) { 00768 _M_insert(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); 00769 } 00770 00771 public: 00772 // Check whether it's an integral type. If so, it's not an iterator. 00773 template <class _InputIterator> 00774 void insert(iterator __pos, _InputIterator __first, _InputIterator __last) { 00775 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral; 00776 _M_insert_dispatch(__pos, __first, __last, _Integral()); 00777 } 00778 00779 #else /* _STLP_MEMBER_TEMPLATES */ 00780 void _M_insert_range_aux(iterator __pos, 00781 const value_type* __first, const value_type* __last, 00782 size_type __n, const __true_type& /*_Movable*/); 00783 void _M_insert_range_aux(iterator __pos, 00784 const value_type* __first, const value_type* __last, 00785 size_type __n, const __false_type& /*_Movable*/); 00786 void _M_insert_range_aux(iterator __pos, 00787 const_iterator __first, const_iterator __last, 00788 size_type __n, const __true_type& /*_Movable*/); 00789 void _M_insert_range_aux(iterator __pos, 00790 const_iterator __first, const_iterator __last, 00791 size_type __n, const __false_type& /*_Movable*/); 00792 public: 00793 void insert(iterator __pos, 00794 const value_type* __first, const value_type* __last); 00795 void insert(iterator __pos, 00796 const_iterator __first, const_iterator __last); 00797 00798 #endif /* _STLP_MEMBER_TEMPLATES */ 00799 00800 public: 00801 #if !defined(_STLP_DONT_SUP_DFLT_PARAM) 00802 void resize(size_type __new_size, 00803 const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) { 00804 #else 00805 void resize(size_type __new_size, const value_type& __x) { 00806 #endif /*_STLP_DONT_SUP_DFLT_PARAM*/ 00807 const size_type __len = size(); 00808 if (__new_size < __len) 00809 erase(this->_M_start + __new_size, this->_M_finish); 00810 else 00811 insert(this->_M_finish, __new_size - __len, __x); 00812 } 00813 00814 #if defined (_STLP_DONT_SUP_DFLT_PARAM) 00815 void resize(size_type __new_size) 00816 { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); } 00817 #endif /*_STLP_DONT_SUP_DFLT_PARAM*/ 00818 00819 protected: 00820 iterator _M_erase(iterator __pos, const __true_type& /*_Movable*/); 00821 iterator _M_erase(iterator __pos, const __false_type& /*_Movable*/); 00822 00823 iterator _M_erase(iterator __first, iterator __last, const __true_type& /*_Movable*/); 00824 iterator _M_erase(iterator __first, iterator __last, const __false_type& /*_Movable*/); 00825 public: // Erase 00826 iterator erase(iterator __pos) { 00827 return _M_erase(__pos, _Movable()); 00828 } 00829 iterator erase(iterator __first, iterator __last) { 00830 if (__first == this->_M_start && __last == this->_M_finish) { 00831 clear(); 00832 return this->_M_finish; 00833 } 00834 else { 00835 if (__first == __last) 00836 return __first; 00837 return _M_erase(__first, __last, _Movable()); 00838 } 00839 } 00840 void clear(); 00841 00842 protected: // Internal construction/destruction 00843 00844 void _M_fill_initialize(const value_type& __val, const __true_type& /*_TrivialInit*/) 00845 {} 00846 void _M_fill_initialize(const value_type& __val, const __false_type& /*_TrivialInit*/); 00847 00848 #if defined (_STLP_MEMBER_TEMPLATES) 00849 template <class _InputIterator> 00850 void _M_range_initialize(_InputIterator __first, _InputIterator __last, 00851 const input_iterator_tag &) { 00852 this->_M_initialize_map(0); 00853 _STLP_TRY { 00854 for ( ; __first != __last; ++__first) 00855 push_back(*__first); 00856 } 00857 _STLP_UNWIND(clear()) 00858 } 00859 template <class _ForwardIterator> 00860 void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 00861 const forward_iterator_tag &) { 00862 size_type __n = distance(__first, __last); 00863 this->_M_initialize_map(__n); 00864 _Map_pointer __cur_node = this->_M_start._M_node; 00865 _STLP_TRY { 00866 for (; __cur_node < this->_M_finish._M_node; ++__cur_node) { 00867 _ForwardIterator __mid = __first; 00868 advance(__mid, this->buffer_size()); 00869 uninitialized_copy(__first, __mid, *__cur_node); 00870 __first = __mid; 00871 } 00872 uninitialized_copy(__first, __last, this->_M_finish._M_first); 00873 } 00874 _STLP_UNWIND(_STLP_STD::_Destroy_Range(this->_M_start, iterator(*__cur_node, __cur_node))) 00875 } 00876 #endif /* _STLP_MEMBER_TEMPLATES */ 00877 00878 protected: // Internal push_* and pop_* 00879 00880 void _M_push_back_aux_v(const value_type&); 00881 void _M_push_front_aux_v(const value_type&); 00882 #if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS) 00883 void _M_push_back_aux(); 00884 void _M_push_front_aux(); 00885 #endif /*_STLP_DONT_SUP_DFLT_PARAM !_STLP_NO_ANACHRONISMS*/ 00886 void _M_pop_back_aux(); 00887 void _M_pop_front_aux(); 00888 00889 protected: // Internal insert functions 00890 00891 #if defined (_STLP_MEMBER_TEMPLATES) 00892 00893 template <class _InputIterator> 00894 void _M_insert(iterator __pos, 00895 _InputIterator __first, 00896 _InputIterator __last, 00897 const input_iterator_tag &) { 00898 copy(__first, __last, inserter(*this, __pos)); 00899 } 00900 00901 template <class _ForwardIterator> 00902 void _M_insert(iterator __pos, 00903 _ForwardIterator __first, _ForwardIterator __last, 00904 const forward_iterator_tag &) { 00905 size_type __n = distance(__first, __last); 00906 if (__pos._M_cur == this->_M_start._M_cur) { 00907 iterator __new_start = _M_reserve_elements_at_front(__n); 00908 _STLP_TRY { 00909 uninitialized_copy(__first, __last, __new_start); 00910 this->_M_start = __new_start; 00911 } 00912 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)) 00913 } 00914 else if (__pos._M_cur == this->_M_finish._M_cur) { 00915 iterator __new_finish = _M_reserve_elements_at_back(__n); 00916 _STLP_TRY { 00917 uninitialized_copy(__first, __last, this->_M_finish); 00918 this->_M_finish = __new_finish; 00919 } 00920 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)) 00921 } 00922 else 00923 _M_insert_range_aux(__pos, __first, __last, __n, _Movable()); 00924 } 00925 00926 template <class _ForwardIterator> 00927 void _M_insert_range_aux(iterator __pos, 00928 _ForwardIterator __first, _ForwardIterator __last, 00929 size_type __n, const __true_type& /*_Movable*/) { 00930 const difference_type __elemsbefore = __pos - this->_M_start; 00931 size_type __length = size(); 00932 if (__elemsbefore <= difference_type(__length / 2)) { 00933 iterator __new_start = _M_reserve_elements_at_front(__n); 00934 __pos = this->_M_start + __elemsbefore; 00935 _STLP_TRY { 00936 iterator __dst = __new_start; 00937 iterator __src = this->_M_start; 00938 for (; __src != __pos; ++__dst, ++__src) { 00939 _STLP_STD::_Move_Construct(&(*__dst), *__src); 00940 _STLP_STD::_Destroy_Moved(&(*__src)); 00941 } 00942 this->_M_start = __new_start; 00943 uninitialized_copy(__first, __last, __dst); 00944 } 00945 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)) 00946 } 00947 else { 00948 iterator __new_finish = _M_reserve_elements_at_back(__n); 00949 const difference_type __elemsafter = difference_type(__length) - __elemsbefore; 00950 __pos = this->_M_finish - __elemsafter; 00951 _STLP_TRY { 00952 iterator __dst = __new_finish; 00953 iterator __src = this->_M_finish; 00954 for (--__src, --__dst; __src >= __pos; --__src, --__dst) { 00955 _STLP_STD::_Move_Construct(&(*__dst), *__src); 00956 _STLP_STD::_Destroy_Moved(&(*__src)); 00957 } 00958 this->_M_finish = __new_finish; 00959 uninitialized_copy(__first, __last, __pos); 00960 } 00961 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)) 00962 } 00963 } 00964 00965 template <class _ForwardIterator> 00966 void _M_insert_range_aux(iterator __pos, 00967 _ForwardIterator __first, _ForwardIterator __last, 00968 size_type __n, const __false_type& /*_Movable*/) { 00969 const difference_type __elemsbefore = __pos - this->_M_start; 00970 size_type __length = size(); 00971 if (__elemsbefore <= difference_type(__length / 2)) { 00972 iterator __new_start = _M_reserve_elements_at_front(__n); 00973 iterator __old_start = this->_M_start; 00974 __pos = this->_M_start + __elemsbefore; 00975 _STLP_TRY { 00976 if (__elemsbefore >= difference_type(__n)) { 00977 iterator __start_n = this->_M_start + difference_type(__n); 00978 uninitialized_copy(this->_M_start, __start_n, __new_start); 00979 this->_M_start = __new_start; 00980 copy(__start_n, __pos, __old_start); 00981 copy(__first, __last, __pos - difference_type(__n)); 00982 } 00983 else { 00984 _ForwardIterator __mid = __first; 00985 advance(__mid, difference_type(__n) - __elemsbefore); 00986 _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start); 00987 this->_M_start = __new_start; 00988 copy(__mid, __last, __old_start); 00989 } 00990 } 00991 _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)) 00992 } 00993 else { 00994 iterator __new_finish = _M_reserve_elements_at_back(__n); 00995 iterator __old_finish = this->_M_finish; 00996 const difference_type __elemsafter = difference_type(__length) - __elemsbefore; 00997 __pos = this->_M_finish - __elemsafter; 00998 _STLP_TRY { 00999 if (__elemsafter > difference_type(__n)) { 01000 iterator __finish_n = this->_M_finish - difference_type(__n); 01001 uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); 01002 this->_M_finish = __new_finish; 01003 copy_backward(__pos, __finish_n, __old_finish); 01004 copy(__first, __last, __pos); 01005 } 01006 else { 01007 _ForwardIterator __mid = __first; 01008 advance(__mid, __elemsafter); 01009 _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish); 01010 this->_M_finish = __new_finish; 01011 copy(__first, __mid, __pos); 01012 } 01013 } 01014 _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)) 01015 } 01016 } 01017 #endif /* _STLP_MEMBER_TEMPLATES */ 01018 01019 iterator _M_reserve_elements_at_front(size_type __n) { 01020 size_type __vacancies = this->_M_start._M_cur - this->_M_start._M_first; 01021 if (__n > __vacancies) 01022 _M_new_elements_at_front(__n - __vacancies); 01023 return this->_M_start - difference_type(__n); 01024 } 01025 01026 iterator _M_reserve_elements_at_back(size_type __n) { 01027 size_type __vacancies = (this->_M_finish._M_last - this->_M_finish._M_cur) - 1; 01028 if (__n > __vacancies) 01029 _M_new_elements_at_back(__n - __vacancies); 01030 return this->_M_finish + difference_type(__n); 01031 } 01032 01033 void _M_new_elements_at_front(size_type __new_elements); 01034 void _M_new_elements_at_back(size_type __new_elements); 01035 01036 protected: // Allocation of _M_map and nodes 01037 01038 // Makes sure the _M_map has space for new nodes. Does not actually 01039 // add the nodes. Can invalidate _M_map pointers. (And consequently, 01040 // deque iterators.) 01041 01042 void _M_reserve_map_at_back (size_type __nodes_to_add = 1) { 01043 if (__nodes_to_add + 1 > this->_M_map_size._M_data - (this->_M_finish._M_node - this->_M_map._M_data)) 01044 _M_reallocate_map(__nodes_to_add, false); 01045 } 01046 01047 void _M_reserve_map_at_front (size_type __nodes_to_add = 1) { 01048 if (__nodes_to_add > size_type(this->_M_start._M_node - this->_M_map._M_data)) 01049 _M_reallocate_map(__nodes_to_add, true); 01050 } 01051 01052 void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); 01053 }; 01054 01055 #if defined (deque) 01056 # undef deque 01057 _STLP_MOVE_TO_STD_NAMESPACE 01058 #endif 01059 01060 _STLP_END_NAMESPACE 01061 01062 #if !defined (_STLP_LINK_TIME_INSTANTIATION) 01063 # include <stl/_deque.c> 01064 #endif 01065 01066 #if defined (_STLP_USE_PTR_SPECIALIZATIONS) 01067 # include <stl/pointers/_deque.h> 01068 #endif 01069 01070 #if defined (_STLP_DEBUG) 01071 # include <stl/debug/_deque.h> 01072 #endif 01073 01074 _STLP_BEGIN_NAMESPACE 01075 01076 #define _STLP_TEMPLATE_CONTAINER deque<_Tp, _Alloc> 01077 #define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc> 01078 #include <stl/_relops_cont.h> 01079 #undef _STLP_TEMPLATE_CONTAINER 01080 #undef _STLP_TEMPLATE_HEADER 01081 01082 #if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) 01083 template <class _Tp, class _Alloc> 01084 struct __move_traits<deque<_Tp, _Alloc> > { 01085 typedef __stlp_movable implemented; 01086 typedef typename __move_traits<_Alloc>::complete complete; 01087 }; 01088 #endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ 01089 01090 _STLP_END_NAMESPACE 01091 01092 #endif /* _STLP_INTERNAL_DEQUE_H */ 01093 01094 // Local Variables: 01095 // mode:C++ 01096 // End: 01097
Generated on Mon Mar 10 15:32:21 2008 by ![]() |