summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/debug/list
diff options
context:
space:
mode:
authorbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-09 04:26:28 +0000
committerbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-09 04:26:28 +0000
commit6a299e0b9775c8d65c03c3652f45994b658d628f (patch)
treeac7c2f2acc6d92bc9cfb2124d2d9ff415962bc49 /libstdc++-v3/include/debug/list
parentcf91a12d15368ea2883e7be90d681e3ef1c06129 (diff)
downloadppe42-gcc-6a299e0b9775c8d65c03c3652f45994b658d628f.tar.gz
ppe42-gcc-6a299e0b9775c8d65c03c3652f45994b658d628f.zip
* include/debug/bitset, include/debug/debug.h, include/debug/deque,
include/debug/formatter.h, include/debug/hash_map.h, include/debug/hash_multimap.h, include/debug/hash_multiset.h, include/debug/hash_set, include/debug/hash_set.h, include/debug/list, include/debug/map.h, include/debug/multimap.h, include/debug/multiset.h, include/debug/safe_base.h, include/debug/safe_iterator.h, include/debug/safe_iterator.tcc, include/debug/safe_sequence.h, include/debug/set.h, include/debug/string, include/debug/vector: Remove trailing whitespace. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74463 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/list')
-rw-r--r--libstdc++-v3/include/debug/list228
1 files changed, 114 insertions, 114 deletions
diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list
index 79dcb1d13d8..f9bb9f9435c 100644
--- a/libstdc++-v3/include/debug/list
+++ b/libstdc++-v3/include/debug/list
@@ -49,17 +49,17 @@ namespace __gnu_debug_def
public:
typedef typename _Allocator::reference reference;
typedef typename _Allocator::const_reference const_reference;
-
- typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, list>
- iterator;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, list>
+ iterator;
typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, list>
const_iterator;
typedef typename _Base::size_type size_type;
typedef typename _Base::difference_type difference_type;
-
- typedef _Tp value_type;
- typedef _Allocator allocator_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
typedef typename _Allocator::pointer pointer;
typedef typename _Allocator::const_pointer const_pointer;
typedef std::reverse_iterator<iterator> reverse_iterator;
@@ -78,96 +78,96 @@ namespace __gnu_debug_def
const _Allocator& __a = _Allocator())
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
{ }
-
+
list(const list& __x) : _Base(__x), _Safe_base() { }
-
+
list(const _Base& __x) : _Base(__x), _Safe_base() { }
-
+
~list() { }
-
- list&
+
+ list&
operator=(const list& __x)
{
static_cast<_Base&>(*this) = __x;
this->_M_invalidate_all();
return *this;
}
-
+
template<class _InputIterator>
- void
+ void
assign(_InputIterator __first, _InputIterator __last)
{
__glibcxx_check_valid_range(__first, __last);
_Base::assign(__first, __last);
this->_M_invalidate_all();
}
-
- void
+
+ void
assign(size_type __n, const _Tp& __t)
{
_Base::assign(__n, __t);
this->_M_invalidate_all();
}
-
+
using _Base::get_allocator;
-
+
// iterators:
- iterator
- begin()
+ iterator
+ begin()
{ return iterator(_Base::begin(), this); }
-
- const_iterator
- begin() const
+
+ const_iterator
+ begin() const
{ return const_iterator(_Base::begin(), this); }
-
- iterator
- end()
+
+ iterator
+ end()
{ return iterator(_Base::end(), this); }
-
- const_iterator
- end() const
+
+ const_iterator
+ end() const
{ return const_iterator(_Base::end(), this); }
-
- reverse_iterator
- rbegin()
+
+ reverse_iterator
+ rbegin()
{ return reverse_iterator(end()); }
-
- const_reverse_iterator
+
+ const_reverse_iterator
rbegin() const
{ return const_reverse_iterator(end()); }
-
- reverse_iterator
- rend()
+
+ reverse_iterator
+ rend()
{ return reverse_iterator(begin()); }
-
- const_reverse_iterator
- rend() const
+
+ const_reverse_iterator
+ rend() const
{ return const_reverse_iterator(begin()); }
-
+
// 23.2.2.2 capacity:
using _Base::empty;
using _Base::size;
using _Base::max_size;
-
- void
+
+ void
resize(size_type __sz, _Tp __c = _Tp())
{
this->_M_detach_singular();
-
+
// if __sz < size(), invalidate all iterators in [begin+__sz, end())
iterator __victim = begin();
iterator __end = end();
for (size_type __i = __sz; __victim != __end && __i > 0; --__i)
++__victim;
-
+
while (__victim != __end)
{
iterator __real_victim = __victim++;
__real_victim._M_invalidate();
}
-
- try
+
+ try
{
_Base::resize(__sz, __c);
}
@@ -177,40 +177,40 @@ namespace __gnu_debug_def
__throw_exception_again;
}
}
-
+
// element access:
- reference
+ reference
front()
{
__glibcxx_check_nonempty();
return _Base::front();
}
-
- const_reference
+
+ const_reference
front() const
{
__glibcxx_check_nonempty();
return _Base::front();
}
-
- reference
+
+ reference
back()
{
__glibcxx_check_nonempty();
return _Base::back();
}
-
- const_reference
+
+ const_reference
back() const
{
__glibcxx_check_nonempty();
return _Base::back();
}
-
+
// 23.2.2.3 modifiers:
using _Base::push_front;
-
- void
+
+ void
pop_front()
{
__glibcxx_check_nonempty();
@@ -218,10 +218,10 @@ namespace __gnu_debug_def
__victim._M_invalidate();
_Base::pop_front();
}
-
+
using _Base::push_back;
-
- void
+
+ void
pop_back()
{
__glibcxx_check_nonempty();
@@ -230,39 +230,39 @@ namespace __gnu_debug_def
__victim._M_invalidate();
_Base::pop_back();
}
-
- iterator
+
+ iterator
insert(iterator __position, const _Tp& __x)
{
__glibcxx_check_insert(__position);
return iterator(_Base::insert(__position.base(), __x), this);
}
-
- void
+
+ void
insert(iterator __position, size_type __n, const _Tp& __x)
{
__glibcxx_check_insert(__position);
_Base::insert(__position.base(), __n, __x);
}
-
+
template<class _InputIterator>
- void
+ void
insert(iterator __position, _InputIterator __first,
_InputIterator __last)
{
__glibcxx_check_insert_range(__position, __first, __last);
_Base::insert(__position.base(), __first, __last);
}
-
- iterator
+
+ iterator
erase(iterator __position)
{
__glibcxx_check_erase(__position);
__position._M_invalidate();
return iterator(_Base::erase(__position.base()), this);
}
-
- iterator
+
+ iterator
erase(iterator __position, iterator __last)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
@@ -276,23 +276,23 @@ namespace __gnu_debug_def
}
return iterator(_Base::erase(__position.base(), __last.base()), this);
}
-
- void
+
+ void
swap(list& __x)
{
_Base::swap(__x);
this->_M_swap(__x);
}
-
- void
+
+ void
clear()
{
_Base::clear();
this->_M_invalidate_all();
}
-
+
// 23.2.2.4 list operations:
- void
+ void
splice(iterator __position, list& __x)
{
_GLIBCXX_DEBUG_VERIFY(&__x != this,
@@ -300,8 +300,8 @@ namespace __gnu_debug_def
._M_sequence(*this, "this"));
this->splice(__position, __x, __x.begin(), __x.end());
}
-
- void
+
+ void
splice(iterator __position, list& __x, iterator __i)
{
__glibcxx_check_insert(__position);
@@ -314,14 +314,14 @@ namespace __gnu_debug_def
_GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(&__x),
_M_message(::__gnu_debug::__msg_splice_other)
._M_iterator(__i, "__i")._M_sequence(__x, "__x"));
-
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 250. splicing invalidates iterators
this->_M_transfer_iter(__i);
_Base::splice(__position.base(), __x._M_base(), __i.base());
}
-
- void
+
+ void
splice(iterator __position, list& __x, iterator __first, iterator __last)
{
__glibcxx_check_insert(__position);
@@ -333,7 +333,7 @@ namespace __gnu_debug_def
_GLIBCXX_DEBUG_VERIFY(__x.get_allocator() == this->get_allocator(),
_M_message(::__gnu_debug::__msg_splice_alloc)
._M_sequence(*this)._M_sequence(__x));
-
+
for (iterator __tmp = __first; __tmp != __last; )
{
_GLIBCXX_DEBUG_VERIFY(&__x != this || __tmp != __position,
@@ -346,12 +346,12 @@ namespace __gnu_debug_def
// 250. splicing invalidates iterators
this->_M_transfer_iter(__victim);
}
-
+
_Base::splice(__position.base(), __x._M_base(), __first.base(),
__last.base());
}
-
- void
+
+ void
remove(const _Tp& __value)
{
for (iterator __x = begin(); __x.base() != _Base::end(); )
@@ -362,9 +362,9 @@ namespace __gnu_debug_def
++__x;
}
}
-
- template<class _Predicate>
- void
+
+ template<class _Predicate>
+ void
remove_if(_Predicate __pred)
{
for (iterator __x = begin(); __x.base() != _Base::end(); )
@@ -375,13 +375,13 @@ namespace __gnu_debug_def
++__x;
}
}
-
- void
+
+ void
unique()
{
iterator __first = begin();
iterator __last = end();
- if (__first == __last)
+ if (__first == __last)
return;
iterator __next = __first;
while (++__next != __last)
@@ -393,14 +393,14 @@ namespace __gnu_debug_def
__next = __first;
}
}
-
+
template<class _BinaryPredicate>
- void
+ void
unique(_BinaryPredicate __binary_pred)
{
iterator __first = begin();
iterator __last = end();
- if (__first == __last)
+ if (__first == __last)
return;
iterator __next = __first;
while (++__next != __last)
@@ -412,8 +412,8 @@ namespace __gnu_debug_def
__next = __first;
}
}
-
- void
+
+ void
merge(list& __x)
{
__glibcxx_check_sorted(_Base::begin(), _Base::end());
@@ -425,13 +425,13 @@ namespace __gnu_debug_def
}
_Base::merge(__x._M_base());
}
-
- template<class _Compare>
- void
+
+ template<class _Compare>
+ void
merge(list& __x, _Compare __comp)
{
__glibcxx_check_sorted_pred(_Base::begin(), _Base::end(), __comp);
- __glibcxx_check_sorted_pred(__x.begin().base(), __x.end().base(),
+ __glibcxx_check_sorted_pred(__x.begin().base(), __x.end().base(),
__comp);
for (iterator __tmp = __x.begin(); __tmp != __x.end(); )
{
@@ -440,24 +440,24 @@ namespace __gnu_debug_def
}
_Base::merge(__x._M_base(), __comp);
}
-
- void
+
+ void
sort() { _Base::sort(); }
-
+
template<typename _StrictWeakOrdering>
- void
+ void
sort(_StrictWeakOrdering __pred) { _Base::sort(__pred); }
-
+
using _Base::reverse;
-
- _Base&
+
+ _Base&
_M_base() { return *this; }
- const _Base&
+ const _Base&
_M_base() const { return *this; }
private:
- void
+ void
_M_invalidate_all()
{
typedef typename _Base::const_iterator _Base_const_iterator;
@@ -465,7 +465,7 @@ namespace __gnu_debug_def
this->_M_invalidate_if(_Not_equal(_M_base().end()));
}
};
-
+
template<typename _Tp, typename _Alloc>
inline bool
operator==(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
@@ -475,12 +475,12 @@ namespace __gnu_debug_def
inline bool
operator!=(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
{ return __lhs._M_base() != __rhs._M_base(); }
-
+
template<typename _Tp, typename _Alloc>
inline bool
operator<(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
{ return __lhs._M_base() < __rhs._M_base(); }
-
+
template<typename _Tp, typename _Alloc>
inline bool
operator<=(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
@@ -490,12 +490,12 @@ namespace __gnu_debug_def
inline bool
operator>=(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
{ return __lhs._M_base() >= __rhs._M_base(); }
-
+
template<typename _Tp, typename _Alloc>
inline bool
operator>(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
{ return __lhs._M_base() > __rhs._M_base(); }
-
+
template<typename _Tp, typename _Alloc>
inline void
swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs)
OpenPOWER on IntegriCloud