3 * - By John Hodge (thePowersGang)
16 template <class T> class list_iterator;
17 template <class T> class list_item;
23 friend class ::std::_bits::list_iterator<T>;
25 typedef ::std::_bits::list_item<T> item_type;
30 typedef value_type& reference;
31 typedef const value_type& const_reference;
32 typedef _bits::list_iterator<value_type> iterator;
33 typedef _bits::list_iterator<const value_type> const_iterator;
39 list(size_t n, const value_type& val = value_type());
45 list& operator =(const list& x);
48 return iterator(m_start);
50 const_iterator begin() const {
51 return const_iterator(m_start);
57 const_iterator end() const {
58 return const_iterator(0);
65 size_t max_size() const;
68 const T& front() const;
70 const T& back() const;
74 item_type* item = m_start;
75 m_start = m_start->next;
93 class list_iterator//:
94 //public bidirectional_iterator_tag;
100 bool operator == (const list_iterator& other) const {
101 return cur == other.cur;
103 bool operator != (const list_iterator& other) const {
104 return cur != other.cur;
113 list_iterator& operator ++ () {
116 list_iterator& operator -- () {
121 list_iterator(list_item<T> *item):
127 }; // namespace _bits