Hi, I just found two issues related to the operators + of the iterator.
The first one is, the n + iterator operator is missing, which is required in a random-access iterator. More specifically, this operator override is missing: ordered_iterator operator+(difference_type, const ordered_iterator&). As a consequence, this piece of code couldn't be compiled:
The second issue is that, the iterator + iterator operator shouldn't exist. As no standard iterator overrides this operator. So this code also doesn't work:
tsl::ordered_map<int, int> mymap = {{-1, 15}, {-2, 17}};
tsl::ordered_map<int, int>::iterator it = mymap.begin();
it + it;
Thank you. I effectively mixed up the ordered_iterator operator+(difference_type, const ordered_iterator&) and difference_type operator+(const ordered_iterator& lhs, const ordered_iterator& rhs).
Hi, I just found two issues related to the operators + of the iterator.
The first one is, the
n + iterator
operator is missing, which is required in a random-access iterator. More specifically, this operator override is missing:ordered_iterator operator+(difference_type, const ordered_iterator&)
. As a consequence, this piece of code couldn't be compiled:The second issue is that, the
iterator + iterator
operator shouldn't exist. As no standard iterator overrides this operator. So this code also doesn't work: