distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
IntrusiveList.hpp
Go to the documentation of this file.
1 
12 #ifndef ESTD_INTRUSIVELIST_HPP_
13 #define ESTD_INTRUSIVELIST_HPP_
14 
15 #include <iterator>
16 
17 #include <cstddef>
18 
19 namespace estd
20 {
21 
22 namespace internal
23 {
24 
25 class IntrusiveListBase;
26 
27 }
28 
39 {
40 public:
41 
45  {
47 
52  constexpr LinkAccessKey()
53  {
54 
55  }
56 
57  LinkAccessKey(const LinkAccessKey&) = delete;
58  LinkAccessKey(LinkAccessKey&&) = delete;
59  const LinkAccessKey& operator=(const LinkAccessKey&) = delete;
60  LinkAccessKey& operator=(LinkAccessKey&&) = delete;
61  };
62 
67  constexpr IntrusiveListNode() :
68  nextNode_{this},
69  previousNode_{this}
70  {
71 
72  }
73 
81  {
82  if (other.isLinked() == false)
83  {
84  reset();
85  return;
86  }
87 
88  nextNode_ = other.nextNode_;
91  other.reset();
92  }
93 
101  {
102  unlink();
103  }
104 
110  {
111  return *nextNode_;
112  }
113 
119  {
120  return *previousNode_;
121  }
122 
127  bool isLinked() const
128  {
129  return nextNode_ != this;
130  }
131 
142  {
143  unlink();
144 
145  nextNode_ = &position;
146  previousNode_ = position.previousNode_;
147  position.previousNode_->nextNode_ = this;
148  position.previousNode_ = this;
149  }
150 
157  void swap(IntrusiveListNode& other)
158  {
159  const auto thisWasLinked = isLinked();
160  const auto otherWasLinked = other.isLinked();
161 
162  if (thisWasLinked == true || otherWasLinked == true)
163  {
164  using std::swap;
165  swap(nextNode_, other.nextNode_);
167 
168  if (thisWasLinked == true)
169  other.nextNode_->previousNode_ = other.previousNode_->nextNode_ = &other;
170  else
171  other.reset();
172 
173  if (otherWasLinked == true)
175  else
176  reset();
177  }
178  }
179 
184  void unlink()
185  {
188 
189  reset();
190  }
191 
192  IntrusiveListNode(const IntrusiveListNode&) = delete;
193  const IntrusiveListNode& operator=(const IntrusiveListNode&) = delete;
194  IntrusiveListNode& operator=(IntrusiveListNode&&) = delete;
195 
196 private:
197 
202  void reset()
203  {
204  nextNode_ = this;
205  previousNode_ = this;
206  }
207 
210 
213 };
214 
215 namespace internal
216 {
217 
226 {
227 public:
228 
233  constexpr IntrusiveListBase() :
234  rootNode_{}
235  {
236 
237  }
238 
246  {
247  clear();
248  }
249 
255  {
256  return rootNode_.getNextNode();
257  }
258 
263  const IntrusiveListNode& begin() const
264  {
265  return rootNode_.getNextNode();
266  }
267 
272  const IntrusiveListNode& cbegin() const
273  {
274  return begin();
275  }
276 
281  const IntrusiveListNode& cend() const
282  {
283  return end();
284  }
285 
290  void clear()
291  {
292  while (empty() == false)
293  pop_front();
294  }
295 
300  bool empty() const
301  {
302  return &begin() == &end();
303  }
304 
310  {
311  return rootNode_;
312  }
313 
318  const IntrusiveListNode& end() const
319  {
320  return rootNode_;
321  }
322 
327  void pop_back()
328  {
329  erase(end().getPreviousNode());
330  }
331 
336  void pop_front()
337  {
338  erase(begin());
339  }
340 
348  {
349  insert(end(), newNode);
350  }
351 
359  {
360  insert(begin(), newNode);
361  }
362 
369  void swap(IntrusiveListBase& other)
370  {
371  rootNode_.swap(other.rootNode_);
372  }
373 
385  {
386  auto& next = position.getNextNode();
387  position.unlink();
388  return next;
389  }
390 
400  static void insert(IntrusiveListNode& position, IntrusiveListNode& newNode)
401  {
402  newNode.link(position, {});
403  }
404 
414  static void splice(IntrusiveListNode& position, IntrusiveListNode& splicedNode)
415  {
416  insert(position, splicedNode);
417  }
418 
419  IntrusiveListBase(const IntrusiveListBase&) = delete;
421  const IntrusiveListBase& operator=(const IntrusiveListBase&) = delete;
422  IntrusiveListBase& operator=(IntrusiveListBase&&) = delete;
423 
424 private:
425 
428 };
429 
437 inline void swap(IntrusiveListBase& left, IntrusiveListBase& right)
438 {
439  left.swap(right);
440 }
441 
442 } // namespace internal
443 
455 template<typename T, IntrusiveListNode T::* NodePointer, typename U = T>
457 {
458 public:
459 
461  using difference_type = ptrdiff_t;
462 
464  using iterator_category = std::bidirectional_iterator_tag;
465 
467  using pointer = U*;
468 
470  using reference = U&;
471 
473  using value_type = U;
474 
479  constexpr IntrusiveListIterator() :
480  node_{}
481  {
482 
483  }
484 
491  constexpr explicit IntrusiveListIterator(IntrusiveListNode* const node) :
492  node_{node}
493  {
494 
495  }
496 
503  constexpr explicit IntrusiveListIterator(reference element) :
504  node_{&(element.*NodePointer)}
505  {
506  static_assert(std::is_same<U, T>::value == true || std::is_convertible<U*, T*>::value == true,
507  "U* must be implicitly convertible to T*!");
508  }
509 
517  {
518  return getPointer();
519  }
520 
528  {
529  return *getPointer();
530  }
531 
539  {
540  node_ = &node_->getNextNode();
541  return *this;
542  }
543 
551  {
552  const auto temporary = *this;
553  node_ = &node_->getNextNode();
554  return temporary;
555  }
556 
564  {
566  return *this;
567  }
568 
576  {
577  const auto temporary = *this;
579  return temporary;
580  }
581 
590  bool operator==(const IntrusiveListIterator& other) const
591  {
592  return node_ == other.node_;
593  }
594 
595 private:
596 
604  {
605  static_assert(std::is_same<U, T>::value == true || std::is_convertible<U*, T*>::value == true,
606  "U* must be implicitly convertible to T*!");
607 
608  const auto offset = reinterpret_cast<size_t>(&(static_cast<pointer>(nullptr)->*NodePointer));
609  return reinterpret_cast<pointer>(reinterpret_cast<size_t>(node_) - offset);
610  }
611 
614 };
615 
630 template<typename T, IntrusiveListNode T::* NodePointer, typename U = T>
633 {
634  return (left == right) == false;
635 }
636 
648 template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
650 {
651 public:
652 
654  using difference_type = ptrdiff_t;
655 
657  using iterator_category = std::bidirectional_iterator_tag;
658 
660  using pointer = const U*;
661 
663  using reference = const U&;
664 
666  using value_type = U;
667 
673  node_{}
674  {
675 
676  }
677 
684  constexpr explicit IntrusiveListConstIterator(const IntrusiveListNode* const node) :
685  node_{node}
686  {
687 
688  }
689 
696  constexpr explicit IntrusiveListConstIterator(reference element) :
697  node_{&(element.*NodePointer)}
698  {
699  static_assert(std::is_same<U, T>::value == true || std::is_convertible<U*, T*>::value == true,
700  "U* must be implicitly convertible to T*!");
701  }
702 
713  template<IntrusiveListNode T::* NonConstNodePointer>
715  IntrusiveListConstIterator{*iterator}
716  {
717 
718  }
719 
727  {
728  return getPointer();
729  }
730 
738  {
739  return *getPointer();
740  }
741 
749  {
750  node_ = &node_->getNextNode();
751  return *this;
752  }
753 
761  {
762  const auto temporary = *this;
763  node_ = &node_->getNextNode();
764  return temporary;
765  }
766 
774  {
776  return *this;
777  }
778 
786  {
787  const auto temporary = *this;
789  return temporary;
790  }
791 
800  bool operator==(const IntrusiveListConstIterator& other) const
801  {
802  return node_ == other.node_;
803  }
804 
805 private:
806 
814  {
815  static_assert(std::is_same<U, T>::value == true || std::is_convertible<U*, T*>::value == true,
816  "U* must be implicitly convertible to T*!");
817 
818  const auto offset = reinterpret_cast<size_t>(&(static_cast<pointer>(nullptr)->*NodePointer));
819  return reinterpret_cast<pointer>(reinterpret_cast<size_t>(node_) - offset);
820  }
821 
824 };
825 
840 template<typename T, const IntrusiveListNode T::* NodePointer, typename U = T>
843 {
844  return (left == right) == false;
845 }
846 
862 template<typename T, IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
865 {
866  return decltype(right){left} == right;
867 }
868 
884 template<typename T, IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
887 {
888  return (left == right) == false;
889 }
890 
906 template<typename T, IntrusiveListNode T::* NodePointer, const IntrusiveListNode T::* ConstNodePointer, typename U = T>
909 {
910  return right != left;
911 }
912 
926 template<typename T, IntrusiveListNode T::* NodePointer, typename U = T>
928 {
929 public:
930 
933 
935  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
936 
938  using const_pointer = const U*;
939 
941  using const_reference = const U&;
942 
945 
947  using reverse_iterator = std::reverse_iterator<iterator>;
948 
950  using pointer = U*;
951 
953  using reference = U&;
954 
956  using value_type = U;
957 
962  constexpr IntrusiveList() :
964  {
965 
966  }
967 
973  {
974  return *--end();
975  }
976 
982  {
983  return *--end();
984  }
985 
991  {
992  return iterator{&intrusiveListBase_.begin()};
993  }
994 
1000  {
1002  }
1003 
1009  {
1010  return begin();
1011  }
1012 
1018  {
1019  return end();
1020  }
1021 
1026  void clear()
1027  {
1029  }
1030 
1036  {
1037  return rbegin();
1038  }
1039 
1046  {
1047  return rend();
1048  }
1049 
1054  bool empty() const
1055  {
1056  return intrusiveListBase_.empty();
1057  }
1058 
1064  {
1065  return iterator{&intrusiveListBase_.end()};
1066  }
1067 
1073  {
1075  }
1076 
1082  {
1083  return *begin();
1084  }
1085 
1091  {
1092  return *begin();
1093  }
1094 
1099  void pop_back()
1100  {
1101  erase(--end());
1102  }
1103 
1108  void pop_front()
1109  {
1110  erase(begin());
1111  }
1112 
1119  void push_back(reference newElement)
1120  {
1121  insert(end(), newElement);
1122  }
1123 
1130  void push_front(reference newElement)
1131  {
1132  insert(begin(), newElement);
1133  }
1134 
1140  {
1141  return reverse_iterator{end()};
1142  }
1143 
1149  {
1150  return const_reverse_iterator{end()};
1151  }
1152 
1159  {
1160  return reverse_iterator{begin()};
1161  }
1162 
1169  {
1170  return const_reverse_iterator{begin()};
1171  }
1172 
1179  void swap(IntrusiveList& other)
1180  {
1182  }
1183 
1194  static iterator erase(const iterator position)
1195  {
1196  auto& positionNode = (*position).*NodePointer;
1197  auto& nextNode = internal::IntrusiveListBase::erase(positionNode);
1198  return iterator{&nextNode};
1199  }
1200 
1212  static iterator insert(const iterator position, reference newElement)
1213  {
1214  static_assert(std::is_same<U, T>::value == true || std::is_convertible<U*, T*>::value == true,
1215  "U* must be implicitly convertible to T*!");
1216 
1217  auto& positionNode = (*position).*NodePointer;
1218  auto& newElementNode = newElement.*NodePointer;
1219  internal::IntrusiveListBase::insert(positionNode, newElementNode);
1220  return iterator{&newElementNode};
1221  }
1222 
1232  static void splice(const iterator position, const iterator splicedElement)
1233  {
1234  auto& positionNode = (*position).*NodePointer;
1235  auto& splicedElementNode = (*splicedElement).*NodePointer;
1236  internal::IntrusiveListBase::splice(positionNode, splicedElementNode);
1237  }
1238 
1239  IntrusiveList(const IntrusiveList&) = delete;
1240  IntrusiveList(IntrusiveList&&) = default;
1241  const IntrusiveList& operator=(const IntrusiveList&) = delete;
1242  IntrusiveList& operator=(IntrusiveList&&) = delete;
1243 
1244 private:
1245 
1248 };
1249 
1262 template<typename T, IntrusiveListNode T::* NodePointer, typename U = T>
1264 {
1265  left.swap(right);
1266 }
1267 
1268 } // namespace estd
1269 
1270 #endif // ESTD_INTRUSIVELIST_HPP_
void push_back(reference newElement)
Links the element at the end of the list.
Definition: IntrusiveList.hpp:1119
Collection of useful templates.
Definition: DmaChannel.hpp:121
IntrusiveList class is an intrusive circular doubly linked list.
Definition: IntrusiveList.hpp:927
std::bidirectional_iterator_tag iterator_category
category of the iterator
Definition: IntrusiveList.hpp:464
const_reference back() const
Definition: IntrusiveList.hpp:981
IntrusiveListIterator operator++(int)
IntrusiveListIterator's unary postfix increment operator.
Definition: IntrusiveList.hpp:550
U & reference
reference to object "pointed to" by the iterator
Definition: IntrusiveList.hpp:470
const MutexControlBlock * const_pointer
const pointer to value linked in the list
Definition: IntrusiveList.hpp:938
IntrusiveListNode * nextNode_
reference to next node on the list
Definition: IntrusiveList.hpp:209
MutexControlBlock & reference
reference to value linked in the list
Definition: IntrusiveList.hpp:953
IntrusiveListNode * previousNode_
reference to previous node on the list
Definition: IntrusiveList.hpp:212
const_iterator begin() const
Definition: IntrusiveList.hpp:999
std::bidirectional_iterator_tag iterator_category
category of the iterator
Definition: IntrusiveList.hpp:657
IntrusiveListNode & getPreviousNode() const
Definition: IntrusiveList.hpp:118
const IntrusiveListNode & begin() const
Definition: IntrusiveList.hpp:263
const_iterator cend() const
Definition: IntrusiveList.hpp:1017
constexpr IntrusiveListConstIterator(reference element)
IntrusiveListConstIterator's constructor.
Definition: IntrusiveList.hpp:696
internal::IntrusiveListBase intrusiveListBase_
internal IntrusiveListBase object
Definition: IntrusiveList.hpp:1247
bool empty() const
Definition: IntrusiveList.hpp:1054
bool operator==(const IntrusiveListConstIterator &other) const
IntrusiveListConstIterator's "equal to" comparison operator.
Definition: IntrusiveList.hpp:800
const_iterator cbegin() const
Definition: IntrusiveList.hpp:1008
MutexControlBlock * pointer
pointer to value linked in the list
Definition: IntrusiveList.hpp:950
pointer getPointer() const
Converts contained pointer to IntrusiveListNode to pointer to object that contains this node.
Definition: IntrusiveList.hpp:603
IntrusiveListIterator & operator++()
IntrusiveListIterator's unary prefix increment operator.
Definition: IntrusiveList.hpp:538
IntrusiveListConstIterator class is a const iterator of elements on IntrusiveList.
Definition: IntrusiveList.hpp:649
U * pointer
pointer to object "pointed to" by the iterator
Definition: IntrusiveList.hpp:467
const IntrusiveListNode * node_
pointer to const IntrusiveListNode of the object "pointed to" by the iterator
Definition: IntrusiveList.hpp:823
constexpr IntrusiveListIterator()
IntrusiveListIterator's constructor.
Definition: IntrusiveList.hpp:479
constexpr IntrusiveListNode()
IntrusiveListNode's constructor.
Definition: IntrusiveList.hpp:67
void swap(IntrusiveListNode &other)
Swaps contents with another node.
Definition: IntrusiveList.hpp:157
void swap(IntrusiveList< T, NodePointer, U > &left, IntrusiveList< T, NodePointer, U > &right)
Swaps contents of two lists.
Definition: IntrusiveList.hpp:1263
~IntrusiveListNode()
IntrusiveListNode's destructor.
Definition: IntrusiveList.hpp:100
bool operator==(const IntrusiveListIterator &other) const
IntrusiveListIterator's "equal to" comparison operator.
Definition: IntrusiveList.hpp:590
void pop_front()
Unlinks the first node from the list.
Definition: IntrusiveList.hpp:336
static void insert(IntrusiveListNode &position, IntrusiveListNode &newNode)
Links the node in the list before position.
Definition: IntrusiveList.hpp:400
void push_front(IntrusiveListNode &newNode)
Links the node at the beginning of the list.
Definition: IntrusiveList.hpp:358
const IntrusiveListNode & cbegin() const
Definition: IntrusiveList.hpp:272
MutexControlBlock value_type
value linked in the list
Definition: IntrusiveList.hpp:956
void reset()
Resets the node to the same state as right after construction.
Definition: IntrusiveList.hpp:202
void swap(IntrusiveList &other)
Swaps contents with another list.
Definition: IntrusiveList.hpp:1179
reverse_iterator rend()
Definition: IntrusiveList.hpp:1158
iterator end()
Definition: IntrusiveList.hpp:1063
IntrusiveListNode class is the node that is needed for the object to be linked in IntrusiveList.
Definition: IntrusiveList.hpp:38
IntrusiveListNode & end()
Definition: IntrusiveList.hpp:309
bool operator!=(const IntrusiveForwardListIterator< T, NodePointer, U > &left, const IntrusiveForwardListIterator< T, NodePointer, U > &right)
IntrusiveForwardListIterator's "not equal to" comparison operator.
Definition: IntrusiveForwardList.hpp:578
reference operator *() const
IntrusiveListIterator's unary prefix dereference operator.
Definition: IntrusiveList.hpp:527
IntrusiveListConstIterator & operator--()
IntrusiveListConstIterator's unary prefix decrement operator.
Definition: IntrusiveList.hpp:773
bool empty() const
Definition: IntrusiveList.hpp:300
void push_back(IntrusiveListNode &newNode)
Links the node at the end of the list.
Definition: IntrusiveList.hpp:347
const_reverse_iterator crend() const
Definition: IntrusiveList.hpp:1045
constexpr IntrusiveListConstIterator()
IntrusiveListConstIterator's constructor.
Definition: IntrusiveList.hpp:672
IntrusiveListBase class provides base functionalities for IntrusiveList class, but without any knowle...
Definition: IntrusiveList.hpp:225
void swap(IntrusiveListBase &other)
Swaps contents with another list.
Definition: IntrusiveList.hpp:369
static IntrusiveListNode & erase(IntrusiveListNode &position)
Unlinks the node at position from the list.
Definition: IntrusiveList.hpp:384
void pop_back()
Unlinks the last node from the list.
Definition: IntrusiveList.hpp:327
void clear()
Unlinks all elements from the list.
Definition: IntrusiveList.hpp:1026
void unlink()
Unlinks the node from the list.
Definition: IntrusiveList.hpp:184
static void splice(const iterator position, const iterator splicedElement)
Transfers the element from one list to another list before position.
Definition: IntrusiveList.hpp:1232
U value_type
value "pointed to" by the iterator
Definition: IntrusiveList.hpp:473
U value_type
value "pointed to" by the iterator
Definition: IntrusiveList.hpp:666
const_reverse_iterator rbegin() const
Definition: IntrusiveList.hpp:1148
std::reverse_iterator< const_iterator > const_reverse_iterator
const reverse iterator of elements on the list
Definition: IntrusiveList.hpp:935
IntrusiveListConstIterator operator--(int)
IntrusiveListConstIterator's unary postfix decrement operator.
Definition: IntrusiveList.hpp:785
void link(IntrusiveListNode &position, LinkAccessKey)
Links the node in the list before position.
Definition: IntrusiveList.hpp:141
~IntrusiveListBase()
IntrusiveListBase's destructor.
Definition: IntrusiveList.hpp:245
IntrusiveListNode(IntrusiveListNode &&other)
IntrusiveListNode's move constructor.
Definition: IntrusiveList.hpp:80
IntrusiveListConstIterator operator++(int)
IntrusiveListConstIterator's unary postfix increment operator.
Definition: IntrusiveList.hpp:760
const_reverse_iterator crbegin() const
Definition: IntrusiveList.hpp:1035
pointer getPointer() const
Converts contained pointer to IntrusiveListNode to pointer to object that contains this node.
Definition: IntrusiveList.hpp:813
static void splice(IntrusiveListNode &position, IntrusiveListNode &splicedNode)
Transfers the node from one list to another list before position.
Definition: IntrusiveList.hpp:414
const_reference front() const
Definition: IntrusiveList.hpp:1090
IntrusiveListNode & getNextNode() const
Definition: IntrusiveList.hpp:109
constexpr IntrusiveListIterator(reference element)
IntrusiveListIterator's constructor.
Definition: IntrusiveList.hpp:503
bool isLinked() const
Definition: IntrusiveList.hpp:127
IntrusiveListNode & begin()
Definition: IntrusiveList.hpp:254
void push_front(reference newElement)
Links the element at the beginning of the list.
Definition: IntrusiveList.hpp:1130
iterator begin()
Definition: IntrusiveList.hpp:990
pointer operator->() const
IntrusiveListConstIterator's binary infix pointer member access operator.
Definition: IntrusiveList.hpp:726
const IntrusiveListNode & end() const
Definition: IntrusiveList.hpp:318
IntrusiveListNode * node_
pointer to IntrusiveListNode of the object "pointed to" by the iterator
Definition: IntrusiveList.hpp:613
constexpr IntrusiveListBase()
IntrusiveListBase's constructor.
Definition: IntrusiveList.hpp:233
ptrdiff_t difference_type
difference type
Definition: IntrusiveList.hpp:654
constexpr IntrusiveListConstIterator(const IntrusiveListNode *const node)
IntrusiveListConstIterator's constructor.
Definition: IntrusiveList.hpp:684
reference back()
Definition: IntrusiveList.hpp:972
void swap(IntrusiveForwardListNode &left, IntrusiveForwardListNode &right)
Swaps contents of two nodes.
Definition: IntrusiveForwardList.hpp:172
constexpr IntrusiveListIterator(IntrusiveListNode *const node)
IntrusiveListIterator's constructor.
Definition: IntrusiveList.hpp:491
const_iterator end() const
Definition: IntrusiveList.hpp:1072
pointer operator->() const
IntrusiveListIterator's binary infix pointer member access operator.
Definition: IntrusiveList.hpp:516
reference operator *() const
IntrusiveListConstIterator's unary prefix dereference operator.
Definition: IntrusiveList.hpp:737
void pop_back()
Unlinks the last element from the list.
Definition: IntrusiveList.hpp:1099
const MutexControlBlock & const_reference
const reference to value linked in the list
Definition: IntrusiveList.hpp:941
IntrusiveListConstIterator & operator++()
IntrusiveListConstIterator's unary prefix increment operator.
Definition: IntrusiveList.hpp:748
IntrusiveListIterator operator--(int)
IntrusiveListIterator's unary postfix decrement operator.
Definition: IntrusiveList.hpp:575
static iterator erase(const iterator position)
Unlinks the element at position from the list.
Definition: IntrusiveList.hpp:1194
void pop_front()
Unlinks the first element from the list.
Definition: IntrusiveList.hpp:1108
reference front()
Definition: IntrusiveList.hpp:1081
IntrusiveListNode rootNode_
root node of the intrusive list
Definition: IntrusiveList.hpp:427
bool operator==(const IntrusiveForwardListIterator< T, NodePointer, U > &left, const IntrusiveForwardListConstIterator< T, ConstNodePointer, U > &right)
"Equal to" comparison operator for IntrusiveForwardListIterator and IntrusiveForwardListConstIterator
Definition: IntrusiveForwardList.hpp:789
const U * pointer
pointer to object "pointed to" by the iterator
Definition: IntrusiveList.hpp:660
const_reverse_iterator rend() const
Definition: IntrusiveList.hpp:1168
IntrusiveListIterator & operator--()
IntrusiveListIterator's unary prefix decrement operator.
Definition: IntrusiveList.hpp:563
void clear()
Unlinks all nodes from the list.
Definition: IntrusiveList.hpp:290
static iterator insert(const iterator position, reference newElement)
Links the element in the list before position.
Definition: IntrusiveList.hpp:1212
std::reverse_iterator< iterator > reverse_iterator
reverse iterator of elements on the list
Definition: IntrusiveList.hpp:947
void swap(IntrusiveForwardListBase &left, IntrusiveForwardListBase &right)
Swaps contents of two lists.
Definition: IntrusiveForwardList.hpp:409
constexpr IntrusiveListConstIterator(const IntrusiveListIterator< T, NonConstNodePointer, U > &iterator)
IntrusiveListConstIterator's constructor.
Definition: IntrusiveList.hpp:714
ptrdiff_t difference_type
difference type
Definition: IntrusiveList.hpp:461
const U & reference
reference to object "pointed to" by the iterator
Definition: IntrusiveList.hpp:663
reverse_iterator rbegin()
Definition: IntrusiveList.hpp:1139
constexpr IntrusiveList()
IntrusiveList's constructor.
Definition: IntrusiveList.hpp:962
IntrusiveListIterator class is an iterator of elements on IntrusiveList.
Definition: IntrusiveList.hpp:456
const IntrusiveListNode & cend() const
Definition: IntrusiveList.hpp:281