63 template <
typename Val >
70 template <
typename Val >
77 template <
typename Val >
78 template <
typename... Args >
80 _val_(
std::forward< Args >(args)...) {
86 template <
typename Val >
93 template <
typename Val >
105 template <
typename Val >
112 template <
typename Val >
118 template <
typename Val >
124 template <
typename Val >
130 template <
typename Val >
136 template <
typename Val >
142 template <
typename Val >
154 template <
typename Val >
161 template <
typename Val >
169 template <
typename Val >
177 template <
typename Val >
186 template <
typename Val >
200 for (_bucket_ = theList.
_deb_list_; ind_elt; --ind_elt, _bucket_ = _bucket_->_next_) {}
204 --ind_elt, _bucket_ = _bucket_->_prev_) {}
209 template <
typename Val >
216 template <
typename Val >
222 _bucket_ = src._bucket_;
227 template <
typename Val >
232 _bucket_ = src._bucket_;
237 template <
typename Val >
243 template <
typename Val >
249 template <
typename Val >
256 template <
typename Val >
262 template <
typename Val >
272 template <
typename Val >
284 template <
typename Val >
294 template <
typename Val >
306 template <
typename Val >
313 template <
typename Val >
320 template <
typename Val >
326 template <
typename Val >
332 template <
typename Val >
339 template <
typename Val >
346 template <
typename Val >
363 template <
typename Val >
369 template <
typename Val >
376 template <
typename Val >
383 template <
typename Val >
391 template <
typename Val >
398 template <
typename Val >
406 template <
typename Val >
414 template <
typename Val >
420 template <
typename Val >
426 template <
typename Val >
432 template <
typename Val >
439 template <
typename Val >
447 template <
typename Val >
454 template <
typename Val >
462 template <
typename Val >
469 template <
typename Val >
476 template <
typename Val >
482 template <
typename Val >
488 template <
typename Val >
494 template <
typename Val >
506 template <
typename Val >
513 template <
typename Val >
524 template <
typename Val >
532 if (
_list_ !=
nullptr)
_list_->_safe_iterators_.push_back(
this);
537 template <
typename Val >
545 if (ind_elt >=
_list_->_nb_elements_) {
551 if (ind_elt < (
_list_->_nb_elements_ >> 1)) {
565 template <
typename Val >
574 std::vector< ListConstIteratorSafe< Val >* >& vect =
_list_->_safe_iterators_;
576 for (
auto ptr = vect.rbegin(); ptr != vect.rend(); --ptr) {
583 src._list_ =
nullptr;
584 src._bucket_ =
nullptr;
585 src._null_pointing_ =
false;
590 template <
typename Val >
593 std::vector< ListConstIteratorSafe< Val >* >& vect =
_list_->_safe_iterators_;
595 for (
auto i = vect.size() - 1; i >= 0; --i) {
596 if (vect[i] ==
this) {
597 vect.erase(vect.begin() + i);
604 template <
typename Val >
615 if (_list_ && (src.
_list_ != _list_)) {
616 _removeFromSafeList_();
623 src.
_list_->_safe_iterators_.push_back(
this);
627 _null_pointing_ =
false;
643 template <
typename Val >
654 _removeFromSafeList_();
659 if ((src.
_list_ !=
nullptr)) {
660 std::vector< ListConstIteratorSafe< Val >* >& vect = src.
_list_->_safe_iterators_;
661 Idx index_src =
Size(vect.size()) - 1;
663 for (;; --index_src) {
664 if (vect[index_src] == &src) {
break; }
667 if (_list_ ==
nullptr) {
668 vect[index_src] =
this;
670 vect.erase(vect.begin() + index_src);
689 template <
typename Val >
699 template <
typename Val >
705 template <
typename Val >
717 template <
typename Val >
724 template <
typename Val >
732 template <
typename Val >
761 if (_bucket_ !=
nullptr) { _bucket_ = _bucket_->_next_; }
768 template <
typename Val >
777 if (_prev_current_bucket_ !=
nullptr) {
778 _bucket_ = _prev_current_bucket_->_prev_;
784 if (_next_current_bucket_ !=
nullptr) {
785 _bucket_ = _next_current_bucket_;
796 if (_bucket_ !=
nullptr) { _bucket_ = _bucket_->_prev_; }
799 for (--i; i && (_bucket_ !=
nullptr); --i, _bucket_ = _bucket_->_prev_) {}
805 template <
typename Val >
833 if (_bucket_ !=
nullptr) { _bucket_ = _bucket_->_next_; }
836 for (--i; i && (_bucket_ !=
nullptr); --i, _bucket_ = _bucket_->_next_) {}
842 template <
typename Val >
845 if (!i)
return *
this;
852 template <
typename Val >
888 template <
typename Val >
891 if (!i)
return *
this;
898 template <
typename Val >
905 template <
typename Val >
912 template <
typename Val >
920 template <
typename Val >
928 template <
typename Val >
935 template <
typename Val >
942 template <
typename Val >
949 for (; iter1 != iter3; ++iter3, ++res) {}
961 template <
typename Val >
967 template <
typename Val >
975 template <
typename Val >
983 template <
typename Val >
990 template <
typename Val >
997 template <
typename Val >
1006 template <
typename Val >
1015 template <
typename Val >
1021 template <
typename Val >
1027 template <
typename Val >
1033 template <
typename Val >
1040 template <
typename Val >
1048 template <
typename Val >
1055 template <
typename Val >
1063 template <
typename Val >
1070 template <
typename Val >
1077 template <
typename Val >
1083 template <
typename Val >
1089 template <
typename Val >
1095 template <
typename Val >
1107 template <
typename Val >
1121 new_elt->
_prev_ = old_ptr;
1123 if (old_ptr) old_ptr->
_next_ = new_elt;
1131 for (; _deb_list_ !=
nullptr; _deb_list_ =
const_cast< ListBucket< Val >*
>(ptr)) {
1132 ptr = _deb_list_->
_next_;
1136 _deb_list_ =
nullptr;
1141 _end_list_ = old_ptr;
1146 template <
typename Val >
1166 template <
typename Val >
1169 GUM_CONSTRUCTOR(
List);
1176 template <
typename Val >
1189 template <
typename Val >
1204 template <
typename Val >
1207 GUM_CONSTRUCTOR(
List);
1210 for (
const auto& val: list) {
1219 template <
typename Val >
1222 GUM_DESTRUCTOR(
List);
1230 template <
typename Val >
1248 template <
typename Val >
1274 template <
typename Val >
1280 template <
typename Val >
1286 template <
typename Val >
1292 template <
typename Val >
1298 template <
typename Val >
1304 template <
typename Val >
1310 template <
typename Val >
1316 template <
typename Val >
1322 template <
typename Val >
1328 template <
typename Val >
1334 template <
typename Val >
1340 template <
typename Val >
1346 template <
typename Val >
1352 template <
typename Val >
1358 template <
typename Val >
1364 template <
typename Val >
1371 template <
typename Val >
1378 template <
typename Val >
1385 template <
typename Val >
1392 template <
typename Val >
1399 template <
typename Val >
1405 template <
typename Val >
1411 template <
typename Val >
1412 template <
typename... Args >
1415 std::forward< Args >(args)...);
1419 template <
typename Val >
1432 return new_elt->
_val_;
1436 template <
typename Val >
1450 return new_elt->
_val_;
1454 template <
typename Val >
1460 template <
typename Val >
1466 template <
typename Val >
1467 template <
typename... Args >
1469 return pushFront(std::forward< Args >(args)...);
1473 template <
typename Val >
1474 template <
typename... Args >
1480 template <
typename Val >
1486 template <
typename Val >
1492 template <
typename Val >
1493 template <
typename... Args >
1495 return pushBack(std::forward< Args >(args)...);
1499 template <
typename Val >
1500 template <
typename... Args >
1507 template <
typename Val >
1513 template <
typename Val >
1519 template <
typename Val >
1533 template <
typename Val >
1535 new_elt->
_next_ = current_elt;
1537 current_elt->
_prev_ = new_elt;
1540 else new_elt->
_prev_->_next_ = new_elt;
1546 return new_elt->
_val_;
1550 template <
typename Val >
1552 new_elt->
_prev_ = current_elt;
1554 current_elt->
_next_ = new_elt;
1557 else new_elt->
_next_->_prev_ = new_elt;
1563 return new_elt->
_val_;
1567 template <
typename Val >
1576 template <
typename Val >
1586 template <
typename Val >
1603 if (ptr ==
nullptr) {
1619 template <
typename Val >
1626 if (ptr ==
nullptr) {
1642 template <
typename Val >
1645 if (iter.
_list_ !=
this) {
1654 template <
typename Val >
1657 if (iter.
_list_ !=
this) {
1666 template <
typename Val >
1673 template <
typename Val >
1679 template <
typename Val >
1680 template <
typename... Args >
1686 template <
typename Val >
1687 template <
typename... Args >
1693 template <
typename Val >
1701 template <
typename Val >
1709 template <
typename Val >
1715 template <
typename Val >
1718 if (ptr->
_val_ == val)
return true;
1724 template <
typename Val >
1727 if (bucket !=
nullptr) {
1730 if (ptr_iter->_bucket_ == bucket) {
1731 ptr_iter->_next_current_bucket_ = bucket->
_prev_;
1732 ptr_iter->_prev_current_bucket_ = bucket->
_next_;
1733 ptr_iter->_bucket_ =
nullptr;
1734 ptr_iter->_null_pointing_ =
true;
1736 if (ptr_iter->_null_pointing_) {
1737 if (ptr_iter->_next_current_bucket_ == bucket)
1738 ptr_iter->_next_current_bucket_ = bucket->
_prev_;
1740 if (ptr_iter->_prev_current_bucket_ == bucket)
1741 ptr_iter->_prev_current_bucket_ = bucket->
_next_;
1762 template <
typename Val >
1771 template <
typename Val >
1777 template <
typename Val >
1783 template <
typename Val >
1786 if (ptr->
_val_ == val)
return ptr;
1792 template <
typename Val >
1798 template <
typename Val >
1801 iter = next_bucket) {
1802 next_bucket = iter->_next_;
1804 if (val == iter->_val_)
_erase_(iter);
1809 template <
typename Val >
1815 template <
typename Val >
1821 template <
typename Val >
1827 template <
typename Val >
1830 std::stringstream stream;
1834 if (deja) stream <<
" --> ";
1836 stream << ptr->
_val_;
1841 return stream.str();
1845 template <
typename Val >
1846 template <
typename Mount >
1860 template <
typename Val >
1861 template <
typename Mount >
1875 template <
typename Val >
1876 template <
typename Mount >
1890 template <
typename Val >
1891 template <
typename Mount >
1905 template <
typename Val >
1912 template <
typename Val >
1918 template <
typename Val >
1925 iter1 = iter1->_next_, iter2 = iter2->_next_)
1926 if (*iter1 != *iter2)
return false;
1932 template <
typename Val >
1938 template <
typename Val >
1947 template <
typename Val >
1956 template <
typename Val >
1965 template <
typename Val >
Exception : fatal (unknown ?) error.
Exception: at least one argument passed to a function is not what was expected.
Bucket for a chained list.
Val _val_
Val is the value contained in the box.
Val & operator*() noexcept
Dereferencing operator.
const ListBucket< Val > * next() const noexcept
Returns the bucket toward the next element.
ListBucket< Val > * _next_
Chaining toward the adjacent elements.
friend class ListConstIterator< Val >
const ListBucket< Val > * previous() const noexcept
Returns the bucket toward the preceding element.
ListBucket< Val > & operator=(const ListBucket< Val > &src)
Copy operator.
ListBucket()=delete
Removes empty constructor.
ListBucket(typename ListBucket< gum::Instantiation * >::Emplace, Args &&... args)
bool operator!=(const ListBucket< Val > &src) const
Inequality check.
Emplace
C dummy type for the emplace constructor.
bool operator==(const ListBucket< Val > &src) const
Equality check.
~ListBucket()
Class destructor.
ListBucket< Val > * _prev_
Chaining toward the adjacent elements.
Safe const iterators for Lists.
ListConstIteratorSafe< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
ListBucket< Val > * _bucket_
The bucket in the chained list pointed to by the iterator.
std::ptrdiff_t difference_type
Types for STL compliance.
ListConstIteratorSafe< Val > & _opMinus_(Size i) noexcept
Makes the iterator point to i elements before in the List.
void _removeFromSafeList_() const
Remove the iterator for its list' safe iterators list.
ListConstIteratorSafe() noexcept
Default constructor.
ListConstIteratorSafe< Val > & _opPlus_(Size i) noexcept
Makes the iterator point to the next element in the List.
ListConstIteratorSafe< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
ListBucket< Val > * _getBucket_() const noexcept
Returns the bucket the iterator is pointing to.
friend class List< Val >
class List must be a friend because it uses the getBucket method to speed up some processes.
ListConstIteratorSafe< Val > & operator=(const ListConstIteratorSafe< Val > &src)
Copy operator.
void setToEnd()
Positions the iterator to the end of 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 ++.
bool isEnd() const
Returns a bool indicating whether the iterator points to the end of 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 –.
~ListConstIteratorSafe()
Class Desctructor.
const List< Val > * _list_
The list the iterator is pointing to.
bool operator!=(const ListConstIteratorSafe< Val > &src) const
Checks whether two iterators point toward different elements.
ListConstIteratorSafe< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
ListConstIteratorSafe< Val > operator+(difference_type i) noexcept
Returns a new iterator pointing to i further elements in the gum::List.
bool _null_pointing_
Indicates whether the bucket the iterator points to has been deleted.
ListConstIteratorSafe< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
bool operator==(const ListConstIteratorSafe< Val > &src) const
Checks whether two iterators point toward the same elements.
ListConstIteratorSafe< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
void clear()
Makes the iterator point toward nothing.
const Val * operator->() const
Dereferences the value pointed to by the iterator.
Unsafe but fast const iterators for Lists.
ListBucket< Val > * _getBucket_() const noexcept
Returns the bucket the iterator is pointing to.
ListBucket< Val > * _bucket_
The bucket in the chained list pointed to by the iterator.
std::ptrdiff_t difference_type
Types for STL compliance.
ListConstIterator< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
bool isEnd() const noexcept
Returns a bool indicating whether the iterator points to the end of the list.
ListConstIterator< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
void clear() noexcept
Makes the iterator point toward nothing.
ListConstIterator< Val > & operator=(const ListConstIterator< Val > &src) noexcept
Copy operator.
const Val * operator->() const
Dereferences the value pointed to by the iterator.
ListConstIterator< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
void setToEnd() noexcept
Positions the iterator to the end of the list.
friend class List< Val >
Class List must be a friend because it uses the getBucket method to speed up some processes.
ListConstIterator() noexcept
Default constructor.
ListConstIterator< Val > operator+(difference_type i) noexcept
Returns a new iterator pointing to i further elements in the gum::List.
bool operator==(const ListConstIterator< Val > &src) const noexcept
Checks whether two iterators point toward the same elements.
~ListConstIterator() noexcept
Class Desctructor.
bool operator!=(const ListConstIterator< Val > &src) const noexcept
Checks whether two iterators point toward different elements.
ListConstIterator< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
ListConstIterator< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
const Val & operator*() const
Gives access to the content of the iterator.
Safe iterators for Lists.
std::ptrdiff_t difference_type
Types for STL compliance.
~ListIteratorSafe()
Class Desctructor.
ListIteratorSafe< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
ListIteratorSafe< Val > operator+(difference_type i) noexcept
Returns a new iterator pointing to i further elements in the gum::List.
ListIteratorSafe< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
ListIteratorSafe< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
ListIteratorSafe< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
ListIteratorSafe< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
bool operator!=(const ListIteratorSafe< Val > &src) const
Checks whether two iterators point toward different elements.
ListIteratorSafe() noexcept
Default constructor.
ListIteratorSafe< Val > & operator=(const ListIteratorSafe< Val > &src)
Copy operator.
bool operator==(const ListIteratorSafe< Val > &src) const
Checks whether two iterators point toward the same elements.
Val & operator*()
Gives access to the content of the iterator.
Val * operator->()
Dereferences the value pointed to by the iterator.
Unsafe but fast iterators for Lists.
ListIterator< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
ListIterator< Val > operator-(difference_type i) noexcept
Returns a new iterator pointing to i preceding elements in the gum::List.
std::ptrdiff_t difference_type
Types for STL compliance.
ListIterator< Val > & operator=(const ListIterator< Val > &src) noexcept
Copy operator.
bool operator==(const ListIterator< Val > &src) const noexcept
Checks whether two iterators point toward the same elements.
ListIterator< 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
Makes the iterator point to i elements further in the List.
ListIterator() noexcept
Default constructor.
bool operator!=(const ListIterator< Val > &src) const noexcept
Checks whether two iterators point toward different elements.
ListIterator< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
ListIterator< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
const Val * operator->() const
Dereferences the value pointed to by the iterator.
const Val & operator*() const
Gives access to the content of the iterator.
~ListIterator() noexcept
Class destructor.
Generic doubly linked lists.
Val & emplaceFront(Args &&... args)
Emplace elements at the beginning of the chained list.
std::vector< const_iterator_safe * > _safe_iterators_
The list of "safe" iterators attached to the list.
Size size() const noexcept
Returns the number of elements in the list.
const iterator & rend() noexcept
Returns an unsafe iterator pointing just before the beginning of the List.
iterator rbegin()
Returns an unsafe iterator pointing to the last element of the List.
const_iterator cbegin() const
Returns an unsafe const iterator pointing to the beginning of the List.
Val & _pushFront_(ListBucket< Val > *new_elt)
Insert a bucket at the front of the list.
ListBucket< Val > * _createBucket_(const Val &val) const
Create a new bucket with a given value.
ListConstIteratorSafe< Val > const_iterator_safe
Types for STL compliance.
bool operator!=(const List< Val > &src) const
Checks whether two lists are different (different elements or orders).
Val & pushFront(const Val &val)
Inserts a new element (a copy) at the beginning of the chained list.
friend class ListConstIterator< Val >
ListIterator should be a friend to optimize access to elements.
const const_iterator & cend() const noexcept
Returns an unsafe const iterator pointing to the end of the List.
location
Locations around iterators where insertions of new elements can take / place.
Val & _insert_(const const_iterator_safe &iter, ListBucket< Val > *new_elt, location place)
Inserts a new bucket before or after the location pointed to by an iterator.
Val & push_front(Args &&... args)
An alias for pushFront used for STL compliance.
Val & back() const
Returns a reference to last element of a list, if any.
void _erase_(ListBucket< Val > *bucket)
Removes an element from a chained list.
void clear()
Deletes all the elements of a chained list.
friend class ListIteratorSafe< Val >
friend class ListConstIteratorSafe< Val >
Val & front() const
Returns a reference to first element of a list, if any.
std::string toString() const
Converts a list into a string.
ListBucket< Val > * _createEmplaceBucket_(Args &&... args) const
Create an emplace bucket.
const iterator_safe & rendSafe() noexcept
Returns a safe iterator pointing just before the beginning of the List.
iterator_safe beginSafe()
Returns a safe iterator pointing to the beginning of the List.
friend class ListIterator< Val >
List< Mount > map(Mount(*f)(Val)) const
Creates a list of mountains from a list of val.
List< Val > & operator=(const List< Val > &src)
Copy operator.
Val & push_back(Args &&... args)
An alias for pushBack used for STL compliance.
gum::Instantiation *& pushBack(const gum::Instantiation *&val)
ListBucket< Val > * _getIthBucket_(Size i) const noexcept
Returns the bucket corresponding to the ith position in the list.
Val & emplaceBack(Args &&... args)
Emplace elements at the end of the chained list.
const_iterator_safe cbeginSafe() const
Returns a safe const iterator pointing to the beginning of the List.
ListBucket< Val > * _deb_list_
A pointer on the first element of the chained list.
const iterator & end() noexcept
Returns an unsafe iterator pointing to the end of the List.
Val & _pushBack_(ListBucket< Val > *new_elt)
Insert a bucket at the end of the list.
void popBack()
Removes the last element of a List, if any.
List()
A basic constructor that creates an empty list.
const const_iterator & crend() const noexcept
Returns an unsafe const iterator pointing just before the beginning of the List.
ListBucket< Val > * _getBucket_(const Val &val) const noexcept
Returns the bucket corresponding to a given value.
void swap(List &other_list)
Swap the current list with another one.
ListIteratorSafe< Val > iterator_safe
Types for STL compliance.
iterator begin()
Returns an unsafe iterator pointing to the beginning of the List.
void eraseAllVal(const Val &val)
erases all the elements encountered with a given value
Val & _insertAfter_(ListBucket< Val > *new_elt, ListBucket< Val > *current_elt)
Insert a new bucket after another one.
Val & insert(const Val &val)
Inserts a new element at the end of the chained list (alias of pushBack).
bool empty() const noexcept
Returns a boolean indicating whether the chained list is empty.
Size _nb_elements_
The number of elements in the list.
void _copy_elements_(const List< Val > &src)
A function used to perform copies of elements of Lists.
bool exists(const Val &val) const
Checks whether there exists a given element in the list.
const_iterator_safe crbeginSafe() const
Returns a safe const iterator pointing to the last element of the List.
Val & operator+=(const Val &val)
Inserts a new element at the end of the list (alias of pushBack).
Val & emplace(const const_iterator &iter, Args &&... args)
Emplace a new element before a given iterator.
void popFront()
Removes the first element of a List, if any.
const_iterator crbegin() const
Returns an unsafe const iterator pointing to the last element of the List.
const const_iterator_safe & cendSafe() const noexcept
Returns a safe const iterator pointing to the end of the List.
void eraseByVal(const Val &val)
erases the first element encountered with a given value.
bool operator==(const List< Val > &src) const
Checks whether two lists are identical (same elements in the same order).
iterator_safe rbeginSafe()
Returns a safe iterator pointing to the last element of the List.
Val & _insertBefore_(ListBucket< Val > *new_elt, ListBucket< Val > *current_elt)
Insert a new bucket before another one.
Val & operator[](const Size i)
Returns the ith element in the current chained list.
ListConstIterator< Val > const_iterator
Types for STL compliance.
const const_iterator_safe & crendSafe() const noexcept
Return a safe const iterator pointing just before the beginning of the List.
ListBucket< Val > * _end_list_
A pointer on the last element of the chained list.
const iterator_safe & endSafe() noexcept
Returns a safe iterator pointing to the end of the List.
void erase(Size i)
Erases the ith element of the List (the first one is in position 0).
Exception : the element we looked for cannot be found.
Exception : generic error on iterator.
#define GUM_ERROR(type, msg)
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
Generic class for manipulating lists.
#define GUM_DEFAULT_ITERATOR_NUMBER
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &stream, const AVLTree< Val, Cmp > &tree)
display the content of a tree
ListConstIterator< Val >::difference_type operator-(const ListConstIterator< Val > &iter1, const ListConstIterator< Val > &iter2)
For STL compliance, a distance operator.
bool operator==(const HashTableIteratorSafe< Key, Val > &from) const noexcept
Checks whether two iterators are pointing toward equal elements.