56 typedef typename POLICY::Value_type Value_type;
57 typedef typename POLICY::Const_value_type Const_value_type;
62 typedef typename POLICY::Type Internal_type;
65 typedef typename POLICY::Value_type value_type;
66 typedef typename POLICY::Value_type Value_type;
68 Value_type operator * ()
const {
return static_cast<Value_type
>(*_c); }
69 Value_type operator -> ()
const {
return static_cast<Value_type
>(*_c); }
70 Iterator operator ++ () { _c = POLICY::next(_c);
return *
this; }
72 bool operator == (Iterator
const &o)
const {
return *_c == *o._c; }
73 bool operator != (Iterator
const &o)
const {
return !operator == (o); }
75 Iterator() : _c(__end()) {}
79 static Internal_type __end()
81 union X { Internal_type l;
void **v; } z;
82 z.v = &Bits::List_iterator_end_ptr<void>::_end;
86 explicit Iterator(Internal_type i) : _c(i) {}
94 typedef typename POLICY::Const_type Internal_type;
97 typedef typename POLICY::Value_type value_type;
98 typedef typename POLICY::Value_type Value_type;
100 Value_type operator * ()
const {
return static_cast<Value_type
>(_c); }
101 Value_type operator -> ()
const {
return static_cast<Value_type
>(_c); }
102 Const_iterator operator ++ () { _c = POLICY::next(_c);
return *
this; }
104 friend bool operator == (Const_iterator
const &lhs, Const_iterator
const &rhs)
105 {
return lhs._c == rhs._c; }
106 friend bool operator != (Const_iterator
const &lhs, Const_iterator
const &rhs)
107 {
return lhs._c != rhs._c; }
110 Const_iterator(Iterator
const &o) : _c(*o) {}
115 explicit Const_iterator(Internal_type i) : _c(i) {}
139 Value_type
front()
const {
return static_cast<Value_type
>(
_f); }
151 Const_iterator
begin()
const {
return Const_iterator(
_f); }
159 static Const_iterator
iter(Const_value_type c) {
return Const_iterator(c); }
161 Const_iterator
end()
const {
return Const_iterator(
nullptr); }
163 Iterator
end() {
return Iterator(); }
166 static typename POLICY::Type __get_internal(Iterator
const &i) {
return i._c; }
167 static Iterator __iter(
typename POLICY::Type c) {
return Iterator(c); }
170 typename POLICY::Head_type
_f;