13#include "../type_traits" 
   26template <
typename T, 
typename STORE_T>
 
   30  using Storage_type = STORE_T;
 
   32  template<
typename U> 
friend class Smart_ptr_list;
 
 
   45template <
typename ITEM>
 
   48  using Value_type = 
typename ITEM::Value_type;
 
   49  using Next_type = 
typename ITEM::Storage_type;
 
   55    Iterator() : _c(
nullptr) {}
 
   57    Value_type *operator * ()
 const { 
return _c; }
 
   58    Value_type *operator -> ()
 const { 
return _c; }
 
   60    Iterator operator ++ ()
 
   66    bool operator == (Iterator 
const &o)
 const { 
return _c == o._c; }
 
   67    bool operator != (Iterator 
const &o)
 const { 
return !operator == (o); }
 
   70    friend class Smart_ptr_list;
 
   72    explicit Iterator(Value_type *i) : _c(i) {}
 
   80    Const_iterator() : _c(
nullptr) {}
 
   82    Value_type 
const *operator * ()
 const { 
return _c; }
 
   83    Value_type 
const *operator -> ()
 const { 
return _c; }
 
   85    Const_iterator operator ++ ()
 
   91    bool operator == (Const_iterator 
const &o)
 const { 
return _c == o._c; }
 
   92    bool operator != (Const_iterator 
const &o)
 const { 
return !operator == (o); }
 
   95    friend class Smart_ptr_list;
 
   97    explicit Const_iterator(Value_type 
const *i) : _c(i) {}
 
  102  Smart_ptr_list() : _b(&_f) {}
 
  107    e->_n = cxx::move(this->_f);
 
  108    this->_f = cxx::move(e);
 
 
  117    e->_n = cxx::move(this->_f);
 
 
  151    Next_type ret = cxx::move(_f);
 
  154      _f = cxx::move(ret->_n);
 
 
  166  Iterator begin() { 
return Iterator(_f.get()); }
 
  167  Iterator end() { 
return Iterator(); }
 
  169  Const_iterator begin()
 const { 
return Const_iterator(_f.get()); }
 
  170  Const_iterator end()
 const { 
return Const_iterator(); }
 
  172  Const_iterator cbegin()
 const { 
return const_iterator(_f.get()); }
 
  173  Const_iterator cend()
 const { 
return Const_iterator(); }
 
 
List item for an arbitrary item in a Smart_ptr_list.
 
Value_type * front() const
Return a pointer to the first element in the list.
 
Next_type pop_front()
Remove the element in front of the list and return it.
 
bool empty() const
Check if the list is empty.
 
void push_front(Next_type &&e)
Add an element to the front of the list.
 
void push_front(Next_type const &e)
Add an element to the front of the list.
 
void push_back(Next_type &&e)
Add an element at the end of the list.
 
void push_back(Next_type const &e)
Add an element at the end of the list.
 
Internal helpers for the cxx package.