39 template <
typename Val >
46 template <
typename Val >
53 template <
typename Val >
54 template <
typename... Args >
57 __val(
std::forward< Args >(args)...) {
63 template <
typename Val >
71 template <
typename Val >
84 template <
typename Val >
91 template <
typename Val >
93 return (src.
__val == __val);
97 template <
typename Val >
99 return (src.
__val != __val);
103 template <
typename Val >
109 template <
typename Val >
115 template <
typename Val >
121 template <
typename Val >
133 template <
typename Val >
140 template <
typename Val >
141 template <
typename Alloc >
144 __bucket{theList.__deb_list} {
150 template <
typename Val >
159 template <
typename Val >
162 __bucket{std::move(src.__bucket)} {
169 template <
typename Val >
185 --ind_elt, __bucket = __bucket->__next) {}
191 --ind_elt, __bucket = __bucket->__prev) {}
196 template <
typename Val >
203 template <
typename Val >
209 __bucket = src.__bucket;
214 template <
typename Val >
219 __bucket = src.__bucket;
224 template <
typename Val >
231 template <
typename Val >
237 template <
typename Val >
244 template <
typename Val >
246 return (__bucket ==
nullptr);
250 template <
typename Val >
255 if (__bucket !=
nullptr) { __bucket = __bucket->__next; }
261 template <
typename Val >
265 for (; i && (__bucket !=
nullptr); --i, __bucket = __bucket->__next) {}
267 for (; i && (__bucket !=
nullptr); ++i, __bucket = __bucket->__prev) {}
273 template <
typename Val >
278 if (__bucket !=
nullptr) { __bucket = __bucket->__prev; }
284 template <
typename Val >
288 for (; i && (__bucket !=
nullptr); --i, __bucket = __bucket->__prev) {}
290 for (; i && (__bucket !=
nullptr); ++i, __bucket = __bucket->__next) {}
296 template <
typename Val >
303 template <
typename Val >
310 template <
typename Val >
313 return (__bucket != src.__bucket);
317 template <
typename Val >
320 return (__bucket == src.__bucket);
324 template <
typename Val >
326 if (__bucket !=
nullptr)
327 return &(__bucket->__val);
334 template <
typename Val >
336 if (__bucket !=
nullptr)
337 return __bucket->__val;
344 template <
typename Val >
362 template <
typename Val >
369 template <
typename Val >
370 template <
typename Alloc >
378 template <
typename Val >
386 template <
typename Val >
394 template <
typename Val >
402 template <
typename Val >
411 template <
typename Val >
420 template <
typename Val >
426 template <
typename Val >
433 template <
typename Val >
441 template <
typename Val >
448 template <
typename Val >
456 template <
typename Val >
463 template <
typename Val >
470 template <
typename Val >
476 template <
typename Val >
488 template <
typename Val >
495 template <
typename Val >
496 template <
typename Alloc >
506 theList.__safe_iterators.push_back(
this);
510 template <
typename Val >
516 src.__null_pointing} {
526 template <
typename Val >
527 template <
typename Alloc >
555 theList.__safe_iterators.push_back(
this);
559 template <
typename Val >
565 src.__null_pointing} {
571 std::vector< ListConstIteratorSafe< Val >* >& vect =
574 for (
auto ptr = vect.rbegin(); ptr != vect.rend(); --ptr) {
581 src.__list =
nullptr;
582 src.__bucket =
nullptr;
583 src.__null_pointing =
false;
588 template <
typename Val >
593 for (
auto i = vect.size() - 1; i >= 0; --i) {
594 if (vect[i] ==
this) {
595 vect.erase(vect.begin() + i);
602 template <
typename Val >
641 template <
typename Val >
657 if ((src.__list !=
nullptr)) {
658 std::vector< ListConstIteratorSafe< Val >* >& vect =
660 Idx index_src =
Size(vect.size()) - 1;
662 for (;; --index_src) {
663 if (vect[index_src] == &src) {
break; }
667 vect[index_src] =
this;
669 vect.erase(vect.begin() + index_src);
679 src.__list =
nullptr;
680 src.__bucket =
nullptr;
681 src.__null_pointing =
false;
688 template <
typename Val >
698 template <
typename Val >
705 template <
typename Val >
717 template <
typename Val >
724 template <
typename Val >
732 template <
typename Val >
769 template <
typename Val >
807 template <
typename Val >
845 template <
typename Val >
848 if (!i)
return *
this;
857 template <
typename Val >
894 template <
typename Val >
897 if (!i)
return *
this;
906 template <
typename Val >
913 template <
typename Val >
920 template <
typename Val >
930 template <
typename Val >
940 template <
typename Val >
950 template <
typename Val >
960 template <
typename Val >
967 for (; iter1 != iter3; ++iter3, ++res) {}
979 template <
typename Val >
986 template <
typename Val >
987 template <
typename Alloc >
995 template <
typename Val >
1004 template <
typename Val >
1005 template <
typename Alloc >
1014 template <
typename Val >
1021 template <
typename Val >
1031 template <
typename Val >
1041 template <
typename Val >
1047 template <
typename Val >
1054 template <
typename Val >
1062 template <
typename Val >
1069 template <
typename Val >
1077 template <
typename Val >
1084 template <
typename Val >
1091 template <
typename Val >
1097 template <
typename Val >
1109 template <
typename Val,
typename Alloc >
1110 template <
typename OtherAlloc >
1120 new_elt = __alloc_bucket.allocate(1);
1123 __alloc_bucket.construct(new_elt, *ptr);
1125 __alloc_bucket.deallocate(new_elt, 1);
1131 new_elt->
__prev = old_ptr;
1134 old_ptr->
__next = new_elt;
1136 __deb_list = new_elt;
1143 for (; __deb_list !=
nullptr;
1145 ptr = __deb_list->
__next;
1146 __alloc_bucket.destroy(__deb_list);
1147 __alloc_bucket.deallocate(__deb_list, 1);
1150 __deb_list =
nullptr;
1155 __end_list = old_ptr;
1160 template <
typename Val,
typename Alloc >
1164 for (
const auto ptr_iter : __safe_iterators) {
1171 next_ptr = ptr->__next;
1172 __alloc_bucket.destroy(ptr);
1173 __alloc_bucket.deallocate(ptr, 1);
1177 __deb_list =
nullptr;
1178 __end_list =
nullptr;
1182 template <
typename Val,
typename Alloc >
1185 GUM_CONSTRUCTOR(
List);
1192 template <
typename Val,
typename Alloc >
1198 __copy_elements(src);
1205 template <
typename Val,
typename Alloc >
1206 template <
typename OtherAlloc >
1212 __copy_elements(src);
1219 template <
typename Val,
typename Alloc >
1221 __deb_list{std::move(src.__deb_list)}, __end_list{std::move(src.__end_list)},
1222 __nb_elements{std::move(src.__nb_elements)},
1223 __safe_iterators{std::move(src.__safe_iterators)}, __alloc_bucket{std::move(
1224 src.__alloc_bucket)} {
1228 src.__deb_list =
nullptr;
1229 src.__end_list =
nullptr;
1230 src.__nb_elements = 0;
1231 src.__safe_iterators.clear();
1235 template <
typename Val,
typename Alloc >
1238 GUM_CONSTRUCTOR(
List);
1241 for (
const auto& val : list) {
1250 template <
typename Val,
typename Alloc >
1253 GUM_DESTRUCTOR(
List);
1261 template <
typename Val,
typename Alloc >
1273 __copy_elements(src);
1280 template <
typename Val,
typename Alloc >
1281 template <
typename OtherAlloc >
1293 __copy_elements(src);
1300 template <
typename Val,
typename Alloc >
1312 __deb_list = std::move(src.__deb_list);
1313 __end_list = std::move(src.__end_list);
1314 __nb_elements = std::move(src.__nb_elements);
1315 __safe_iterators = std::move(src.__safe_iterators);
1316 __alloc_bucket = std::move(src.__alloc_bucket);
1318 src.__deb_list =
nullptr;
1319 src.__end_list =
nullptr;
1320 src.__nb_elements = 0;
1321 src.__safe_iterators.clear();
1328 template <
typename Val,
typename Alloc >
1336 template <
typename Val,
typename Alloc >
1342 template <
typename Val,
typename Alloc >
1349 template <
typename Val,
typename Alloc >
1355 template <
typename Val,
typename Alloc >
1361 template <
typename Val,
typename Alloc >
1369 template <
typename Val,
typename Alloc >
1375 template <
typename Val,
typename Alloc >
1382 template <
typename Val,
typename Alloc >
1388 template <
typename Val,
typename Alloc >
1395 template <
typename Val,
typename Alloc >
1401 template <
typename Val,
typename Alloc >
1407 template <
typename Val,
typename Alloc >
1413 template <
typename Val,
typename Alloc >
1419 template <
typename Val,
typename Alloc >
1425 template <
typename Val,
typename Alloc >
1434 template <
typename Val,
typename Alloc >
1443 template <
typename Val,
typename Alloc >
1452 template <
typename Val,
typename Alloc >
1461 template <
typename Val,
typename Alloc >
1470 template <
typename Val,
typename Alloc >
1477 __alloc_bucket.construct(new_elt, val);
1479 __alloc_bucket.deallocate(new_elt, 1);
1487 template <
typename Val,
typename Alloc >
1493 __alloc_bucket.construct(new_elt, std::move(val));
1495 __alloc_bucket.deallocate(new_elt, 1);
1503 template <
typename Val,
typename Alloc >
1504 template <
typename... Args >
1511 __alloc_bucket.construct(new_elt,
1513 std::forward< Args >(args)...);
1515 __alloc_bucket.deallocate(new_elt, 1);
1523 template <
typename Val,
typename Alloc >
1525 new_elt->
__next = __deb_list;
1527 if (__deb_list !=
nullptr)
1528 __deb_list->__prev = new_elt;
1530 __end_list = new_elt;
1532 __deb_list = new_elt;
1538 return new_elt->
__val;
1542 template <
typename Val,
typename Alloc >
1545 new_elt->
__prev = __end_list;
1547 if (__end_list !=
nullptr)
1548 __end_list->__next = new_elt;
1550 __deb_list = new_elt;
1552 __end_list = new_elt;
1558 return new_elt->
__val;
1562 template <
typename Val,
typename Alloc >
1564 return __pushFront(__createBucket(val));
1568 template <
typename Val,
typename Alloc >
1570 return __pushFront(__createBucket(std::move(val)));
1574 template <
typename Val,
typename Alloc >
1575 template <
typename... Args >
1577 return pushFront(std::forward< Args >(args)...);
1581 template <
typename Val,
typename Alloc >
1582 template <
typename... Args >
1584 return __pushFront(__createEmplaceBucket(std::forward< Args >(args)...));
1588 template <
typename Val,
typename Alloc >
1590 return __pushBack(__createBucket(val));
1594 template <
typename Val,
typename Alloc >
1596 return __pushBack(__createBucket(std::move(val)));
1600 template <
typename Val,
typename Alloc >
1601 template <
typename... Args >
1603 return pushBack(std::forward< Args >(args)...);
1607 template <
typename Val,
typename Alloc >
1608 template <
typename... Args >
1610 return __pushBack(__createEmplaceBucket(std::forward< Args >(args)...));
1615 template <
typename Val,
typename Alloc >
1617 return pushBack(val);
1621 template <
typename Val,
typename Alloc >
1623 return pushBack(std::move(val));
1627 template <
typename Val,
typename Alloc >
1632 if (i < __nb_elements / 2) {
1633 for (ptr = __deb_list; i; --i, ptr = ptr->
__next) {}
1635 for (ptr = __end_list, i = __nb_elements - i - 1; i;
1636 --i, ptr = ptr->
__prev) {}
1643 template <
typename Val,
typename Alloc >
1646 new_elt->
__next = current_elt;
1648 current_elt->
__prev = new_elt;
1650 if (new_elt->
__prev ==
nullptr)
1651 __deb_list = new_elt;
1653 new_elt->
__prev->__next = new_elt;
1659 return new_elt->
__val;
1663 template <
typename Val,
typename Alloc >
1666 new_elt->
__prev = current_elt;
1668 current_elt->
__next = new_elt;
1670 if (new_elt->
__next ==
nullptr)
1671 __end_list = new_elt;
1673 new_elt->
__next->__prev = new_elt;
1679 return new_elt->
__val;
1683 template <
typename Val,
typename Alloc >
1686 if (__nb_elements <= pos) {
return pushBack(val); }
1688 return __insertBefore(__createBucket(val), __getIthBucket(pos));
1692 template <
typename Val,
typename Alloc >
1695 if (__nb_elements <= pos) {
return pushBack(std::move(val)); }
1697 return __insertBefore(__createBucket(std::move(val)), __getIthBucket(pos));
1702 template <
typename Val,
typename Alloc >
1710 if (place == location::BEFORE) {
1719 if (ptr ==
nullptr) {
1721 return __pushBack(new_elt);
1724 case location::BEFORE:
return __insertBefore(new_elt, ptr);
1726 case location::AFTER:
return __insertAfter(new_elt, ptr);
1736 template <
typename Val,
typename Alloc >
1743 if (ptr ==
nullptr) {
1745 return __pushBack(new_elt);
1748 case location::BEFORE:
return __insertBefore(new_elt, ptr);
1750 case location::AFTER:
return __insertAfter(new_elt, ptr);
1760 template <
typename Val,
typename Alloc >
1765 if (iter.
__list !=
this) {
1767 "the iterator does not point to the correct list");
1770 return __insert(iter, __createBucket(val), place);
1775 template <
typename Val,
typename Alloc >
1780 if (iter.
__list !=
this) {
1782 "the iterator does not point to the correct list");
1785 return __insert(iter, __createBucket(std::move(val)), place);
1790 template <
typename Val,
typename Alloc >
1794 return __insert(iter, __createBucket(val), place);
1799 template <
typename Val,
typename Alloc >
1803 return __insert(iter, __createBucket(std::move(val)), place);
1807 template <
typename Val,
typename Alloc >
1808 template <
typename... Args >
1811 return __insert(iter,
1812 __createEmplaceBucket(std::forward< Args >(args)...),
1817 template <
typename Val,
typename Alloc >
1818 template <
typename... Args >
1821 return __insert(iter,
1822 __createEmplaceBucket(std::forward< Args >(args)...),
1827 template <
typename Val,
typename Alloc >
1829 if (__nb_elements ==
Size(0)) {
1833 return __deb_list->__val;
1837 template <
typename Val,
typename Alloc >
1839 if (__nb_elements ==
Size(0)) {
1843 return __end_list->__val;
1847 template <
typename Val,
typename Alloc >
1849 return __nb_elements;
1853 template <
typename Val,
typename Alloc >
1856 if (ptr->__val == val)
return true;
1862 template <
typename Val,
typename Alloc >
1865 if (bucket !=
nullptr) {
1867 for (
const auto ptr_iter : __safe_iterators) {
1868 if (ptr_iter->__bucket == bucket) {
1869 ptr_iter->__next_current_bucket = bucket->
__prev;
1870 ptr_iter->__prev_current_bucket = bucket->
__next;
1871 ptr_iter->__bucket =
nullptr;
1872 ptr_iter->__null_pointing =
true;
1874 if (ptr_iter->__null_pointing) {
1875 if (ptr_iter->__next_current_bucket == bucket)
1876 ptr_iter->__next_current_bucket = bucket->
__prev;
1878 if (ptr_iter->__prev_current_bucket == bucket)
1879 ptr_iter->__prev_current_bucket = bucket->
__next;
1886 if (bucket->
__prev ==
nullptr)
1887 __deb_list = bucket->
__next;
1891 if (bucket->
__next ==
nullptr)
1892 __end_list = bucket->
__prev;
1897 __alloc_bucket.destroy(bucket);
1898 __alloc_bucket.deallocate(bucket, 1);
1905 template <
typename Val,
typename Alloc >
1907 if (i >= __nb_elements)
return;
1910 __erase(__getIthBucket(i));
1914 template <
typename Val,
typename Alloc >
1916 __erase(iter.__getBucket());
1920 template <
typename Val,
typename Alloc >
1926 template <
typename Val,
typename Alloc >
1930 if (ptr->__val == val)
return ptr;
1936 template <
typename Val,
typename Alloc >
1938 __erase(__getBucket(val));
1942 template <
typename Val,
typename Alloc >
1946 iter = next_bucket) {
1947 next_bucket = iter->__next;
1949 if (val == iter->__val) __erase(iter);
1954 template <
typename Val,
typename Alloc >
1956 __erase(__end_list);
1960 template <
typename Val,
typename Alloc >
1962 __erase(__deb_list);
1966 template <
typename Val,
typename Alloc >
1968 return (__nb_elements ==
Size(0));
1972 template <
typename Val,
typename Alloc >
1975 std::stringstream stream;
1979 ptr = ptr->
__next, deja =
true) {
1980 if (deja) stream <<
" --> ";
1982 stream << ptr->__val;
1987 return stream.str();
1991 template <
typename Val,
typename Alloc >
1992 template <
typename Mount,
typename OtherAlloc >
2006 template <
typename Val,
typename Alloc >
2007 template <
typename Mount,
typename OtherAlloc >
2021 template <
typename Val,
typename Alloc >
2022 template <
typename Mount,
typename OtherAlloc >
2036 template <
typename Val,
typename Alloc >
2037 template <
typename Mount,
typename OtherAlloc >
2043 for (
Size i =
Size(0); i < __nb_elements; ++i)
2051 template <
typename Val,
typename Alloc >
2053 return pushBack(val);
2058 template <
typename Val,
typename Alloc >
2060 return pushBack(std::move(val));
2064 template <
typename Val,
typename Alloc >
2065 template <
typename OtherAlloc >
2074 iter1 = iter1->__next, iter2 = iter2->__next)
2075 if (*iter1 != *iter2)
return false;
2081 template <
typename Val,
typename Alloc >
2082 template <
typename OtherAlloc >
2089 template <
typename Val,
typename Alloc >
2092 if (i >= __nb_elements) {
2096 return **__getIthBucket(i);
2100 template <
typename Val,
typename Alloc >
2103 if (i >= __nb_elements) {
2107 return **__getIthBucket(i);
2111 template <
typename Val,
typename Alloc >
2121 template <
typename Val >
2122 std::ostream& operator<<(std::ostream& stream, const List< Val >& list) {
2123 stream << list.toString();
ListBucket< Val > * __next
Chaining toward the adjacent elements.
ListConstIteratorSafe() noexcept
Default constructor.
ListIterator< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
const Val & operator*() const
Gives access to the content of the iterator.
ListConstIteratorSafe< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
ListConstIteratorSafe< Val > operator+(difference_type i) noexcept
Returns a new iterator pointing to i further elements in the gum::List.
ListConstIteratorSafe< Val > & __opPlus(Size i) noexcept
Makes the iterator point to the next element in the List.
const Val & operator*() const
Gives access to the content of the iterator.
ListBucket< Val > * __next_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a ++...
ListConstIterator< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
Safe iterators for Lists.
ListBucket< Val > * __prev
Chaining toward the adjacent elements.
Unsafe but fast iterators for Lists.
location
Locations around iterators where insertions of new elements can take / place.
#define GUM_DEFAULT_ITERATOR_NUMBER
ListIterator< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
std::ptrdiff_t difference_type
Types for STL compliance.
Val & operator*()
Gives access to the iterator's content.
void swap(HashTable< LpCol, double > *&a, HashTable< LpCol, double > *&b)
Swap the addresses of two pointers to hashTables.
ListConstIteratorSafe< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
Generic doubly linked lists.
ListConstIterator< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
gum is the global namespace for all aGrUM entities
bool operator==(const ListConstIteratorSafe< Val > &src) const
Checks whether two iterators point toward the same elements.
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
ListIterator< Val > & operator=(const ListIterator< Val > &src) noexcept
Copy operator.
Size __nb_elements
The number of elements in the list.
ListConstIterator< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
~ListIteratorSafe()
Class Desctructor.
ListIteratorSafe< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
ListIteratorSafe< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
ListIteratorSafe< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
Emplace
C dummy type for the emplace constructor.
ListIterator< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
std::vector< const_iterator_safe *> __safe_iterators
The list of "safe" iterators attached to the list.
ListBucket()=delete
Removes empty constructor.
ListConstIterator< Val > & operator=(const ListConstIterator< Val > &src) noexcept
Copy operator.
ListIterator< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
ListIteratorSafe< Val > & operator=(const ListIteratorSafe< Val > &src)
Copy operator.
ListConstIteratorSafe< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
Generic class for manipulating lists.
std::ptrdiff_t difference_type
Types for STL compliance.
ListConstIteratorSafe< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
ListBucket< Val > * __prev_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a –...
ListIteratorSafe< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
LpExpr operator+(LpExpr &&lhs, const T2 &rhs)
Overload of operator + between anything ( a scalar, a variable or an expression ) and anything except...
Val & pushBack(const Val &val)
Inserts a new element (a copy) at the end of the chained list.
bool operator==(const TiXmlString &a, const TiXmlString &b)
std::ptrdiff_t difference_type
Types for STL compliance.
void __removeFromSafeList() const
Remove the iterator for its list' safe iterators list.
Unsafe but fast const iterators for Lists.
ListIteratorSafe() noexcept
Default constructor.
void setToEnd()
Positions the iterator to the end of the list.
~ListIterator() noexcept
Class destructor.
LpExpr operator*(const SCALAR &lhs, const LpCol &rhs)
Overload of operator * between a scalar and a variable.
Val * operator->()
Dereferences the value pointed to by the iterator.
~ListConstIteratorSafe()
Class Desctructor.
Val & operator*()
Gives access to the content of the iterator.
void clear()
Makes the iterator point toward nothing.
bool operator!=(const TiXmlString &a, const TiXmlString &b)
ListBucket< Val > * __getBucket() const noexcept
Returns the bucket the iterator is pointing to.
Val __val
Val is the value contained in the box.
bool operator!=(const ListConstIteratorSafe< Val > &src) const
Checks whether two iterators point toward different elements.
List()
A basic constructor that creates an empty list.
ListConstIteratorSafe< Val > & __opMinus(Size i) noexcept
Makes the iterator point to i elements before in the List.
Safe const iterators for Lists.
ListConstIterator< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
Val * operator->()
Dereferences the value pointed to by the iterator.
ListConstIteratorSafe< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
Bucket for a chained list.
Size Idx
Type for indexes.
INLINE ListConstIteratorSafe< Val >::difference_type operator-(const ListConstIteratorSafe< Val > &iter1, const ListConstIteratorSafe< Val > &iter2)
For STL compliance, a distance operator.
ListConstIteratorSafe< Val > & operator=(const ListConstIteratorSafe< Val > &src)
Copy operator.
void __copy_elements(const List< Val, OtherAlloc > &src)
A function used to perform copies of elements of Lists.
bool isEnd() const
Returns a bool indicating whether the iterator points to the end of the list.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
ListBucket< Val > * __deb_list
A pointer on the first element of the chained list.
BucketAllocator __alloc_bucket
The allocator for the buckets.
void clear()
Deletes all the elements of a chained list.
ListIteratorSafe< Val > operator+(difference_type i) noexcept
Returns a new iterator pointing to i further elements in the gum::List.
ListIterator< Val > operator+(difference_type i) noexcept
Returns a new iterator pointing to i further elements in the gum::List.
std::ptrdiff_t difference_type
Types for STL compliance.
const Val * operator->() const
Dereferences the value pointed to by the iterator.
const List< Val, std::allocator< Val > > * __list
The list the iterator is pointing to.
ListIteratorSafe< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
#define GUM_ERROR(type, msg)
ListBucket< Val > * __end_list
A pointer on the last element of the chained list.
ListIterator< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
ListBucket< Val > * __getBucket() const noexcept
Returns the bucket the iterator is pointing to.
const Val * operator->() const
Dereferences the value pointed to by the iterator.