| OLD | NEW |
| 1 // -*- C++ -*- | 1 // -*- C++ -*- |
| 2 //===---------------------------- list ------------------------------------===// | 2 //===---------------------------- list ------------------------------------===// |
| 3 // | 3 // |
| 4 // The LLVM Compiler Infrastructure | 4 // The LLVM Compiler Infrastructure |
| 5 // | 5 // |
| 6 // This file is dual licensed under the MIT and the University of Illinois Open | 6 // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 // Source Licenses. See LICENSE.TXT for details. | 7 // Source Licenses. See LICENSE.TXT for details. |
| 8 // | 8 // |
| 9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// |
| 10 | 10 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 template <class _Tp, class _VoidPtr> | 212 template <class _Tp, class _VoidPtr> |
| 213 struct __list_node | 213 struct __list_node |
| 214 : public __list_node_base<_Tp, _VoidPtr> | 214 : public __list_node_base<_Tp, _VoidPtr> |
| 215 { | 215 { |
| 216 _Tp __value_; | 216 _Tp __value_; |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TYPE_VIS_ONLY
list; | 219 template <class _Tp, class _Alloc = counting_allocator<_Tp, allocation_group::li
st> > class _LIBCPP_TYPE_VIS_ONLY list; |
| 220 template <class _Tp, class _Alloc> class __list_imp; | 220 template <class _Tp, class _Alloc> class __list_imp; |
| 221 template <class _Tp, class _VoidPtr> class _LIBCPP_TYPE_VIS_ONLY __list_const_it
erator; | 221 template <class _Tp, class _VoidPtr> class _LIBCPP_TYPE_VIS_ONLY __list_const_it
erator; |
| 222 | 222 |
| 223 template <class _Tp, class _VoidPtr> | 223 template <class _Tp, class _VoidPtr> |
| 224 class _LIBCPP_TYPE_VIS_ONLY __list_iterator | 224 class _LIBCPP_TYPE_VIS_ONLY __list_iterator |
| 225 { | 225 { |
| 226 typedef typename __rebind_pointer<_VoidPtr, __list_node<_Tp, _VoidPtr> >::ty
pe | 226 typedef typename __rebind_pointer<_VoidPtr, __list_node<_Tp, _VoidPtr> >::ty
pe |
| 227 __node_pointer; | 227 __node_pointer; |
| 228 | 228 |
| 229 __node_pointer __ptr_; | 229 __node_pointer __ptr_; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 protected: | 478 protected: |
| 479 typedef _Tp value_type; | 479 typedef _Tp value_type; |
| 480 typedef _Alloc allocator_ty
pe; | 480 typedef _Alloc allocator_ty
pe; |
| 481 typedef allocator_traits<allocator_type> __alloc_trai
ts; | 481 typedef allocator_traits<allocator_type> __alloc_trai
ts; |
| 482 typedef typename __alloc_traits::size_type size_type; | 482 typedef typename __alloc_traits::size_type size_type; |
| 483 typedef typename __alloc_traits::void_pointer __void_point
er; | 483 typedef typename __alloc_traits::void_pointer __void_point
er; |
| 484 typedef __list_iterator<value_type, __void_pointer> iterator; | 484 typedef __list_iterator<value_type, __void_pointer> iterator; |
| 485 typedef __list_const_iterator<value_type, __void_pointer> const_iterat
or; | 485 typedef __list_const_iterator<value_type, __void_pointer> const_iterat
or; |
| 486 typedef __list_node_base<value_type, __void_pointer> __node_base; | 486 typedef __list_node_base<value_type, __void_pointer> __node_base; |
| 487 typedef __list_node<value_type, __void_pointer> __node; | 487 typedef __list_node<value_type, __void_pointer> __node; |
| 488 typedef typename __rebind_alloc_helper<__alloc_traits, __node>::type __node_
allocator; | 488 typedef typename __rebind_counting_alloc_helper<__alloc_traits, __node>::typ
e __node_allocator; |
| 489 typedef allocator_traits<__node_allocator> __node_allo
c_traits; | 489 typedef allocator_traits<__node_allocator> __node_allo
c_traits; |
| 490 typedef typename __node_alloc_traits::pointer __node_poin
ter; | 490 typedef typename __node_alloc_traits::pointer __node_poin
ter; |
| 491 typedef typename __node_alloc_traits::pointer __node_cons
t_pointer; | 491 typedef typename __node_alloc_traits::pointer __node_cons
t_pointer; |
| 492 typedef typename __alloc_traits::pointer pointer; | 492 typedef typename __alloc_traits::pointer pointer; |
| 493 typedef typename __alloc_traits::const_pointer const_point
er; | 493 typedef typename __alloc_traits::const_pointer const_point
er; |
| 494 typedef typename __alloc_traits::difference_type difference_
type; | 494 typedef typename __alloc_traits::difference_type difference_
type; |
| 495 | 495 |
| 496 typedef typename __rebind_alloc_helper<__alloc_traits, __node_base>::type __
node_base_allocator; | 496 typedef typename __rebind_counting_alloc_helper<__alloc_traits, __node_base,
false>::type __node_base_allocator; |
| 497 typedef typename allocator_traits<__node_base_allocator>::pointer __node_bas
e_pointer; | 497 typedef typename allocator_traits<__node_base_allocator>::pointer __node_bas
e_pointer; |
| 498 | 498 |
| 499 __node_base __end_; | 499 __node_base __end_; |
| 500 __compressed_pair<size_type, __node_allocator> __size_alloc_; | 500 __compressed_pair<size_type, __node_allocator> __size_alloc_; |
| 501 | 501 |
| 502 _LIBCPP_INLINE_VISIBILITY | 502 _LIBCPP_INLINE_VISIBILITY |
| 503 size_type& __sz() _NOEXCEPT {return __size_alloc_.first();} | 503 size_type& __sz() _NOEXCEPT {return __size_alloc_.first();} |
| 504 _LIBCPP_INLINE_VISIBILITY | 504 _LIBCPP_INLINE_VISIBILITY |
| 505 const size_type& __sz() const _NOEXCEPT | 505 const size_type& __sz() const _NOEXCEPT |
| 506 {return __size_alloc_.first();} | 506 {return __size_alloc_.first();} |
| (...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 void | 2320 void |
| 2321 swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) | 2321 swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) |
| 2322 _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) | 2322 _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) |
| 2323 { | 2323 { |
| 2324 __x.swap(__y); | 2324 __x.swap(__y); |
| 2325 } | 2325 } |
| 2326 | 2326 |
| 2327 _LIBCPP_END_NAMESPACE_STD | 2327 _LIBCPP_END_NAMESPACE_STD |
| 2328 | 2328 |
| 2329 #endif // _LIBCPP_LIST | 2329 #endif // _LIBCPP_LIST |
| OLD | NEW |