50 template <
typename T, const
size_t MAX_SIZE_>
55 static const size_t MAX_SIZE = MAX_SIZE_;
61 typedef const T* const_pointer;
63 typedef const T& const_reference;
64 typedef size_t size_type;
70 :
ilist<T>(&node_pool[0], MAX_SIZE)
77 explicit list(
size_t initialSize,
typename ilist<T>::parameter_t value = T())
78 :
ilist<T>(&node_pool[0], MAX_SIZE)
87 :
ilist<T>(&node_pool[0], MAX_SIZE)
95 template <
typename TIterator>
96 list(TIterator first, TIterator last)
97 :
ilist<T>(&node_pool[0], MAX_SIZE)
130 for (
size_t i = 0; i < MAX_SIZE; ++i)
138 index = std::distance(&node_pool[0],
static_cast<typename
ilist<T>::Data_Node*
>(data_node.previous));
139 data_node.previous = &other.node_pool[index];
141 index = std::distance(&node_pool[0],
static_cast<typename
ilist<T>::Data_Node*
>(data_node.next));
142 data_node.next = &other.node_pool[index];
159 for (
size_t i = 0; i < MAX_SIZE; ++i)
167 index = std::distance(&other.node_pool[0], static_cast<
typename ilist<T>::Data_Node*>(data_node.previous));
168 data_node.previous = &node_pool[index];
170 index = std::distance(&other.node_pool[0], static_cast<
typename ilist<T>::Data_Node*>(data_node.next));
171 data_node.next = &node_pool[index];
190 template <
typename T, const
size_t MAX_SIZE>
void assign(TIterator first, TIterator last)
If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws list_iterator if the iterators are reversed...
Definition: ilist.h:501
list()
Default constructor.
Definition: list.h:69
void swap(etl::bitset< N > &lhs, etl::bitset< N > &rhs)
swap
Definition: bitset.h:1200
size_type current_size
The number of the used nodes.
Definition: list_base.h:148
Definition: algorithm.h:43
TContainer::iterator end(TContainer &container)
Definition: container.h:95
TContainer::iterator begin(TContainer &container)
Definition: container.h:45
void swap(list &other)
Swap.
Definition: list.h:115
list(const list &other)
Copy constructor.
Definition: list.h:86
list(TIterator first, TIterator last)
Construct from range.
Definition: list.h:96
const_iterator cend() const
Gets the end of the list.
Definition: ilist.h:418
size_type next_free
The index of the next free node.
Definition: list_base.h:147
list & operator=(const list &rhs)
Assignment operator.
Definition: list.h:105
list(size_t initialSize, typename ilist< T >::parameter_t value=T())
Construct from size and value.
Definition: list.h:77
Node terminal_node
The node that acts as the list start and end.
Definition: ilist.h:122
bool is_free() const
Checks if the node is free.
Definition: ilist.h:96
const_iterator cbegin() const
Gets the beginning of the list.
Definition: ilist.h:410
The data node element in the list.
Definition: ilist.h:116