42 template <
typename Val >
49 template <
typename Val >
56 template <
typename Val >
57 template <
typename... Args >
60 __val(
std::forward< Args >(args)...) {
66 template <
typename Val >
74 template <
typename Val >
87 template <
typename Val >
94 template <
typename Val >
96 return (src.
__val == __val);
100 template <
typename Val >
102 return (src.
__val != __val);
106 template <
typename Val >
112 template <
typename Val >
118 template <
typename Val >
124 template <
typename Val >
136 template <
typename Val >
143 template <
typename Val >
144 template <
typename Alloc >
147 __bucket{theList.__deb_list} {
153 template <
typename Val >
162 template <
typename Val >
165 __bucket{std::move(src.__bucket)} {
172 template <
typename Val >
188 --ind_elt, __bucket = __bucket->__next) {}
194 --ind_elt, __bucket = __bucket->__prev) {}
199 template <
typename Val >
206 template <
typename Val >
212 __bucket = src.__bucket;
217 template <
typename Val >
222 __bucket = src.__bucket;
227 template <
typename Val >
234 template <
typename Val >
240 template <
typename Val >
247 template <
typename Val >
249 return (__bucket ==
nullptr);
253 template <
typename Val >
258 if (__bucket !=
nullptr) { __bucket = __bucket->__next; }
264 template <
typename Val >
268 for (; i && (__bucket !=
nullptr); --i, __bucket = __bucket->__next) {}
270 for (; i && (__bucket !=
nullptr); ++i, __bucket = __bucket->__prev) {}
276 template <
typename Val >
281 if (__bucket !=
nullptr) { __bucket = __bucket->__prev; }
287 template <
typename Val >
291 for (; i && (__bucket !=
nullptr); --i, __bucket = __bucket->__prev) {}
293 for (; i && (__bucket !=
nullptr); ++i, __bucket = __bucket->__next) {}
299 template <
typename Val >
306 template <
typename Val >
313 template <
typename Val >
316 return (__bucket != src.__bucket);
320 template <
typename Val >
323 return (__bucket == src.__bucket);
327 template <
typename Val >
329 if (__bucket !=
nullptr)
330 return &(__bucket->__val);
337 template <
typename Val >
339 if (__bucket !=
nullptr)
340 return __bucket->__val;
347 template <
typename Val >
365 template <
typename Val >
372 template <
typename Val >
373 template <
typename Alloc >
381 template <
typename Val >
389 template <
typename Val >
397 template <
typename Val >
405 template <
typename Val >
414 template <
typename Val >
423 template <
typename Val >
429 template <
typename Val >
436 template <
typename Val >
444 template <
typename Val >
451 template <
typename Val >
459 template <
typename Val >
466 template <
typename Val >
473 template <
typename Val >
479 template <
typename Val >
491 template <
typename Val >
498 template <
typename Val >
499 template <
typename Alloc >
509 theList.__safe_iterators.push_back(
this);
513 template <
typename Val >
519 src.__null_pointing} {
529 template <
typename Val >
530 template <
typename Alloc >
558 theList.__safe_iterators.push_back(
this);
562 template <
typename Val >
568 src.__null_pointing} {
574 std::vector< ListConstIteratorSafe< Val >* >& vect =
577 for (
auto ptr = vect.rbegin(); ptr != vect.rend(); --ptr) {
584 src.__list =
nullptr;
585 src.__bucket =
nullptr;
586 src.__null_pointing =
false;
591 template <
typename Val >
596 for (
auto i = vect.size() - 1; i >= 0; --i) {
597 if (vect[i] ==
this) {
598 vect.erase(vect.begin() + i);
605 template <
typename Val >
644 template <
typename Val >
660 if ((src.__list !=
nullptr)) {
661 std::vector< ListConstIteratorSafe< Val >* >& vect =
663 Idx index_src =
Size(vect.size()) - 1;
665 for (;; --index_src) {
666 if (vect[index_src] == &src) {
break; }
670 vect[index_src] =
this;
672 vect.erase(vect.begin() + index_src);
682 src.__list =
nullptr;
683 src.__bucket =
nullptr;
684 src.__null_pointing =
false;
691 template <
typename Val >
701 template <
typename Val >
708 template <
typename Val >
720 template <
typename Val >
727 template <
typename Val >
735 template <
typename Val >
772 template <
typename Val >
810 template <
typename Val >
848 template <
typename Val >
851 if (!i)
return *
this;
860 template <
typename Val >
897 template <
typename Val >
900 if (!i)
return *
this;
909 template <
typename Val >
916 template <
typename Val >
923 template <
typename Val >
933 template <
typename Val >
943 template <
typename Val >
953 template <
typename Val >
963 template <
typename Val >
970 for (; iter1 != iter3; ++iter3, ++res) {}
982 template <
typename Val >
989 template <
typename Val >
990 template <
typename Alloc >
998 template <
typename Val >
1007 template <
typename Val >
1008 template <
typename Alloc >
1017 template <
typename Val >
1024 template <
typename Val >
1034 template <
typename Val >
1044 template <
typename Val >
1050 template <
typename Val >
1057 template <
typename Val >
1065 template <
typename Val >
1072 template <
typename Val >
1080 template <
typename Val >
1087 template <
typename Val >
1094 template <
typename Val >
1100 template <
typename Val >
1112 template <
typename Val,
typename Alloc >
1113 template <
typename OtherAlloc >
1123 new_elt = __alloc_bucket.allocate(1);
1126 __alloc_bucket.construct(new_elt, *ptr);
1128 __alloc_bucket.deallocate(new_elt, 1);
1134 new_elt->
__prev = old_ptr;
1137 old_ptr->
__next = new_elt;
1139 __deb_list = new_elt;
1146 for (; __deb_list !=
nullptr;
1148 ptr = __deb_list->
__next;
1149 __alloc_bucket.destroy(__deb_list);
1150 __alloc_bucket.deallocate(__deb_list, 1);
1153 __deb_list =
nullptr;
1158 __end_list = old_ptr;
1163 template <
typename Val,
typename Alloc >
1167 for (
const auto ptr_iter : __safe_iterators) {
1174 next_ptr = ptr->__next;
1175 __alloc_bucket.destroy(ptr);
1176 __alloc_bucket.deallocate(ptr, 1);
1180 __deb_list =
nullptr;
1181 __end_list =
nullptr;
1185 template <
typename Val,
typename Alloc >
1188 GUM_CONSTRUCTOR(
List);
1195 template <
typename Val,
typename Alloc >
1201 __copy_elements(src);
1208 template <
typename Val,
typename Alloc >
1209 template <
typename OtherAlloc >
1215 __copy_elements(src);
1222 template <
typename Val,
typename Alloc >
1224 __deb_list{std::move(src.__deb_list)}, __end_list{std::move(src.__end_list)},
1225 __nb_elements{std::move(src.__nb_elements)},
1226 __safe_iterators{std::move(src.__safe_iterators)}, __alloc_bucket{std::move(
1227 src.__alloc_bucket)} {
1231 src.__deb_list =
nullptr;
1232 src.__end_list =
nullptr;
1233 src.__nb_elements = 0;
1234 src.__safe_iterators.clear();
1238 template <
typename Val,
typename Alloc >
1241 GUM_CONSTRUCTOR(
List);
1244 for (
const auto& val : list) {
1253 template <
typename Val,
typename Alloc >
1256 GUM_DESTRUCTOR(
List);
1264 template <
typename Val,
typename Alloc >
1276 __copy_elements(src);
1283 template <
typename Val,
typename Alloc >
1284 template <
typename OtherAlloc >
1296 __copy_elements(src);
1303 template <
typename Val,
typename Alloc >
1315 __deb_list = std::move(src.__deb_list);
1316 __end_list = std::move(src.__end_list);
1317 __nb_elements = std::move(src.__nb_elements);
1318 __safe_iterators = std::move(src.__safe_iterators);
1319 __alloc_bucket = std::move(src.__alloc_bucket);
1321 src.__deb_list =
nullptr;
1322 src.__end_list =
nullptr;
1323 src.__nb_elements = 0;
1324 src.__safe_iterators.clear();
1331 template <
typename Val,
typename Alloc >
1339 template <
typename Val,
typename Alloc >
1345 template <
typename Val,
typename Alloc >
1352 template <
typename Val,
typename Alloc >
1358 template <
typename Val,
typename Alloc >
1364 template <
typename Val,
typename Alloc >
1372 template <
typename Val,
typename Alloc >
1378 template <
typename Val,
typename Alloc >
1385 template <
typename Val,
typename Alloc >
1391 template <
typename Val,
typename Alloc >
1398 template <
typename Val,
typename Alloc >
1404 template <
typename Val,
typename Alloc >
1410 template <
typename Val,
typename Alloc >
1416 template <
typename Val,
typename Alloc >
1422 template <
typename Val,
typename Alloc >
1428 template <
typename Val,
typename Alloc >
1437 template <
typename Val,
typename Alloc >
1446 template <
typename Val,
typename Alloc >
1455 template <
typename Val,
typename Alloc >
1464 template <
typename Val,
typename Alloc >
1473 template <
typename Val,
typename Alloc >
1480 __alloc_bucket.construct(new_elt, val);
1482 __alloc_bucket.deallocate(new_elt, 1);
1490 template <
typename Val,
typename Alloc >
1496 __alloc_bucket.construct(new_elt, std::move(val));
1498 __alloc_bucket.deallocate(new_elt, 1);
1506 template <
typename Val,
typename Alloc >
1507 template <
typename... Args >
1514 __alloc_bucket.construct(new_elt,
1516 std::forward< Args >(args)...);
1518 __alloc_bucket.deallocate(new_elt, 1);
1526 template <
typename Val,
typename Alloc >
1528 new_elt->
__next = __deb_list;
1530 if (__deb_list !=
nullptr)
1531 __deb_list->__prev = new_elt;
1533 __end_list = new_elt;
1535 __deb_list = new_elt;
1541 return new_elt->
__val;
1545 template <
typename Val,
typename Alloc >
1548 new_elt->
__prev = __end_list;
1550 if (__end_list !=
nullptr)
1551 __end_list->__next = new_elt;
1553 __deb_list = new_elt;
1555 __end_list = new_elt;
1561 return new_elt->
__val;
1565 template <
typename Val,
typename Alloc >
1567 return __pushFront(__createBucket(val));
1571 template <
typename Val,
typename Alloc >
1573 return __pushFront(__createBucket(std::move(val)));
1577 template <
typename Val,
typename Alloc >
1578 template <
typename... Args >
1580 return pushFront(std::forward< Args >(args)...);
1584 template <
typename Val,
typename Alloc >
1585 template <
typename... Args >
1587 return __pushFront(__createEmplaceBucket(std::forward< Args >(args)...));
1591 template <
typename Val,
typename Alloc >
1593 return __pushBack(__createBucket(val));
1597 template <
typename Val,
typename Alloc >
1599 return __pushBack(__createBucket(std::move(val)));
1603 template <
typename Val,
typename Alloc >
1604 template <
typename... Args >
1606 return pushBack(std::forward< Args >(args)...);
1610 template <
typename Val,
typename Alloc >
1611 template <
typename... Args >
1613 return __pushBack(__createEmplaceBucket(std::forward< Args >(args)...));
1618 template <
typename Val,
typename Alloc >
1620 return pushBack(val);
1624 template <
typename Val,
typename Alloc >
1626 return pushBack(std::move(val));
1630 template <
typename Val,
typename Alloc >
1635 if (i < __nb_elements / 2) {
1636 for (ptr = __deb_list; i; --i, ptr = ptr->
__next) {}
1638 for (ptr = __end_list, i = __nb_elements - i - 1; i;
1639 --i, ptr = ptr->
__prev) {}
1646 template <
typename Val,
typename Alloc >
1649 new_elt->
__next = current_elt;
1651 current_elt->
__prev = new_elt;
1653 if (new_elt->
__prev ==
nullptr)
1654 __deb_list = new_elt;
1656 new_elt->
__prev->__next = new_elt;
1662 return new_elt->
__val;
1666 template <
typename Val,
typename Alloc >
1669 new_elt->
__prev = current_elt;
1671 current_elt->
__next = new_elt;
1673 if (new_elt->
__next ==
nullptr)
1674 __end_list = new_elt;
1676 new_elt->
__next->__prev = new_elt;
1682 return new_elt->
__val;
1686 template <
typename Val,
typename Alloc >
1689 if (__nb_elements <= pos) {
return pushBack(val); }
1691 return __insertBefore(__createBucket(val), __getIthBucket(pos));
1695 template <
typename Val,
typename Alloc >
1698 if (__nb_elements <= pos) {
return pushBack(std::move(val)); }
1700 return __insertBefore(__createBucket(std::move(val)), __getIthBucket(pos));
1705 template <
typename Val,
typename Alloc >
1713 if (place == location::BEFORE) {
1722 if (ptr ==
nullptr) {
1724 return __pushBack(new_elt);
1727 case location::BEFORE:
return __insertBefore(new_elt, ptr);
1729 case location::AFTER:
return __insertAfter(new_elt, ptr);
1739 template <
typename Val,
typename Alloc >
1746 if (ptr ==
nullptr) {
1748 return __pushBack(new_elt);
1751 case location::BEFORE:
return __insertBefore(new_elt, ptr);
1753 case location::AFTER:
return __insertAfter(new_elt, ptr);
1763 template <
typename Val,
typename Alloc >
1768 if (iter.
__list !=
this) {
1770 "the iterator does not point to the correct list");
1773 return __insert(iter, __createBucket(val), place);
1778 template <
typename Val,
typename Alloc >
1783 if (iter.
__list !=
this) {
1785 "the iterator does not point to the correct list");
1788 return __insert(iter, __createBucket(std::move(val)), place);
1793 template <
typename Val,
typename Alloc >
1797 return __insert(iter, __createBucket(val), place);
1802 template <
typename Val,
typename Alloc >
1806 return __insert(iter, __createBucket(std::move(val)), place);
1810 template <
typename Val,
typename Alloc >
1811 template <
typename... Args >
1814 return __insert(iter,
1815 __createEmplaceBucket(std::forward< Args >(args)...),
1820 template <
typename Val,
typename Alloc >
1821 template <
typename... Args >
1824 return __insert(iter,
1825 __createEmplaceBucket(std::forward< Args >(args)...),
1830 template <
typename Val,
typename Alloc >
1832 if (__nb_elements ==
Size(0)) {
1836 return __deb_list->__val;
1840 template <
typename Val,
typename Alloc >
1842 if (__nb_elements ==
Size(0)) {
1846 return __end_list->__val;
1850 template <
typename Val,
typename Alloc >
1852 return __nb_elements;
1856 template <
typename Val,
typename Alloc >
1859 if (ptr->__val == val)
return true;
1865 template <
typename Val,
typename Alloc >
1868 if (bucket !=
nullptr) {
1870 for (
const auto ptr_iter : __safe_iterators) {
1871 if (ptr_iter->__bucket == bucket) {
1872 ptr_iter->__next_current_bucket = bucket->
__prev;
1873 ptr_iter->__prev_current_bucket = bucket->
__next;
1874 ptr_iter->__bucket =
nullptr;
1875 ptr_iter->__null_pointing =
true;
1877 if (ptr_iter->__null_pointing) {
1878 if (ptr_iter->__next_current_bucket == bucket)
1879 ptr_iter->__next_current_bucket = bucket->
__prev;
1881 if (ptr_iter->__prev_current_bucket == bucket)
1882 ptr_iter->__prev_current_bucket = bucket->
__next;
1889 if (bucket->
__prev ==
nullptr)
1890 __deb_list = bucket->
__next;
1894 if (bucket->
__next ==
nullptr)
1895 __end_list = bucket->
__prev;
1900 __alloc_bucket.destroy(bucket);
1901 __alloc_bucket.deallocate(bucket, 1);
1908 template <
typename Val,
typename Alloc >
1910 if (i >= __nb_elements)
return;
1913 __erase(__getIthBucket(i));
1917 template <
typename Val,
typename Alloc >
1919 __erase(iter.__getBucket());
1923 template <
typename Val,
typename Alloc >
1929 template <
typename Val,
typename Alloc >
1933 if (ptr->__val == val)
return ptr;
1939 template <
typename Val,
typename Alloc >
1941 __erase(__getBucket(val));
1945 template <
typename Val,
typename Alloc >
1949 iter = next_bucket) {
1950 next_bucket = iter->__next;
1952 if (val == iter->__val) __erase(iter);
1957 template <
typename Val,
typename Alloc >
1959 __erase(__end_list);
1963 template <
typename Val,
typename Alloc >
1965 __erase(__deb_list);
1969 template <
typename Val,
typename Alloc >
1971 return (__nb_elements ==
Size(0));
1975 template <
typename Val,
typename Alloc >
1978 std::stringstream stream;
1982 ptr = ptr->
__next, deja =
true) {
1983 if (deja) stream <<
" --> ";
1985 stream << ptr->__val;
1990 return stream.str();
1994 template <
typename Val,
typename Alloc >
1995 template <
typename Mount,
typename OtherAlloc >
2009 template <
typename Val,
typename Alloc >
2010 template <
typename Mount,
typename OtherAlloc >
2024 template <
typename Val,
typename Alloc >
2025 template <
typename Mount,
typename OtherAlloc >
2039 template <
typename Val,
typename Alloc >
2040 template <
typename Mount,
typename OtherAlloc >
2046 for (
Size i =
Size(0); i < __nb_elements; ++i)
2054 template <
typename Val,
typename Alloc >
2056 return pushBack(val);
2061 template <
typename Val,
typename Alloc >
2063 return pushBack(std::move(val));
2067 template <
typename Val,
typename Alloc >
2068 template <
typename OtherAlloc >
2077 iter1 = iter1->__next, iter2 = iter2->__next)
2078 if (*iter1 != *iter2)
return false;
2084 template <
typename Val,
typename Alloc >
2085 template <
typename OtherAlloc >
2092 template <
typename Val,
typename Alloc >
2095 if (i >= __nb_elements) {
2099 return **__getIthBucket(i);
2103 template <
typename Val,
typename Alloc >
2106 if (i >= __nb_elements) {
2110 return **__getIthBucket(i);
2114 template <
typename Val,
typename Alloc >
2124 template <
typename Val >
2125 std::ostream& operator<<(std::ostream& stream, const List< Val >& list) {
2126 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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.