45 typedef typename POLICY::Value_type Value_type;
46 typedef typename POLICY::Const_value_type Const_value_type;
51 typedef typename POLICY::Type Internal_type;
54 typedef typename POLICY::Value_type value_type;
55 typedef typename POLICY::Value_type Value_type;
57 Value_type operator * ()
const {
return static_cast<Value_type
>(*_c); }
58 Value_type operator -> ()
const {
return static_cast<Value_type
>(*_c); }
59 Iterator operator ++ () { _c = POLICY::next(_c);
return *
this; }
61 bool operator == (Iterator
const &o)
const {
return *_c == *o._c; }
62 bool operator != (Iterator
const &o)
const {
return !operator == (o); }
64 Iterator() : _c(__end()) {}
68 static Internal_type __end()
70 union X { Internal_type l;
void **v; } z;
71 z.v = &Bits::List_iterator_end_ptr<void>::_end;
75 explicit Iterator(Internal_type i) : _c(i) {}
83 typedef typename POLICY::Const_type Internal_type;
86 typedef typename POLICY::Value_type value_type;
87 typedef typename POLICY::Value_type Value_type;
89 Value_type operator * ()
const {
return static_cast<Value_type
>(_c); }
90 Value_type operator -> ()
const {
return static_cast<Value_type
>(_c); }
91 Const_iterator operator ++ () { _c = POLICY::next(_c);
return *
this; }
93 friend bool operator == (Const_iterator
const &lhs, Const_iterator
const &rhs)
94 {
return lhs._c == rhs._c; }
95 friend bool operator != (Const_iterator
const &lhs, Const_iterator
const &rhs)
96 {
return lhs._c != rhs._c; }
99 Const_iterator(Iterator
const &o) : _c(*o) {}
104 explicit Const_iterator(Internal_type i) : _c(i) {}
128 Value_type
front()
const {
return static_cast<Value_type
>(
_f); }
140 Const_iterator
begin()
const {
return Const_iterator(
_f); }
148 static Const_iterator
iter(Const_value_type c) {
return Const_iterator(c); }
150 Const_iterator
end()
const {
return Const_iterator(
nullptr); }
152 Iterator
end() {
return Iterator(); }
155 static typename POLICY::Type __get_internal(Iterator
const &i) {
return i._c; }
156 static Iterator __iter(
typename POLICY::Type c) {
return Iterator(c); }
159 typename POLICY::Head_type
_f;