7template <
typename,
typename>
14template <
typename T,
typename U>
22template <
typename T,
typename U>
35template <
typename T,
typename Tag>
43 friend class List<
T, Tag>;
78 return node_ == other.node_;
85 return !((*this) == other);
258template <
typename T,
typename Tag =
void>
278 head_.prev_ =
nullptr;
279 tail_.next_ =
nullptr;
310 return element_from(
head_.next_);
320 return element_from(
head_.next_);
330 return element_from(
tail_.prev_);
340 return element_from(
tail_.prev_);
417 Node* node =
static_cast<Node*
>(&element);
436 Node* before = &*pos;
437 other.head_.next_->prev_ = before->
prev_;
441 size_ += other.size_;
454 Node const* node = &*pos;
562 return *(
static_cast<pointer>(node));
Intrusive doubly linked list.
value_type const * const_pointer
detail::ListIterator< Node const > const_iterator
const_iterator begin() const noexcept
Obtain a const iterator to the beginning of the list.
List & operator=(List const &)=delete
const_iterator cend() const noexcept
Obtain a const iterator to the end of the list.
reference front() noexcept
Obtain a reference to the first element.
void clear() noexcept
Clear the list.
void insert(iterator pos, List &other) noexcept
Insert another list into this one.
iterator begin() noexcept
Obtain an iterator to the beginning of the list.
const_reference back() const noexcept
Obtain a const reference to the last element.
detail::ListIterator< Node > iterator
iterator iteratorTo(T &element) const noexcept
Obtain an iterator from an element.
iterator insert(iterator pos, T &element) noexcept
Insert an element.
const_iterator constIteratorTo(T const &element) const noexcept
Obtain a const iterator from an element.
iterator append(List &list) noexcept
Append another list at the end of this list.
iterator end() noexcept
Obtain a iterator to the end of the list.
const_reference front() const noexcept
Obtain a const reference to the first element.
reference back() noexcept
Obtain a reference to the last element.
std::ptrdiff_t difference_type
const_iterator end() const noexcept
Obtain a const iterator to the end of the list.
T & popBack() noexcept
Remove the element at the end of the list.
detail::ListNode< T, Tag > Node
bool empty() const noexcept
Determine if the list is empty.
void swap(List &other) noexcept
Swap contents with another list.
List(List const &)=delete
iterator pushBack(T &element) noexcept
Append an element at the end of the list.
reference elementFrom(Node *node) noexcept
value_type const & const_reference
const_reference elementFrom(Node const *node) const noexcept
T & popFront() noexcept
Remove the element at the beginning of the list.
size_type size() const noexcept
Returns the number of elements in the list.
const_iterator cbegin() const noexcept
Obtain a const iterator to the beginning of the list.
List()
Create an empty list.
iterator erase(iterator pos) noexcept
Remove an element.
iterator prepend(List &list) noexcept
Insert another list at the beginning of this list.
iterator pushFront(T &element) noexcept
Insert an element at the beginning of the list.
std::bidirectional_iterator_tag iterator_category
ListIterator & operator++() noexcept
ListIterator & operator--() noexcept
reference operator*() const noexcept
ListIterator operator++(int) noexcept
void decrement() noexcept
reference dereference() const noexcept
ListIterator operator--(int) noexcept
bool operator!=(ListIterator< M > const &other) const noexcept
pointer operator->() const noexcept
bool operator==(ListIterator< M > const &other) const noexcept
std::ptrdiff_t difference_type
void increment() noexcept
ListIterator(ListIterator< M > const &other) noexcept
beast::detail::CopyConst< N, typename N::value_type >::type value_type
ListIterator(N *node=nullptr) noexcept
friend class ListIterator
std::remove_const< U >::type const type
std::remove_const_t< U > type