Reverse Iterations -- Coral Kashri
Sometimes, we all need a way to iterate over a container in the opposite direction. There are several ways to reverse-iterate a container, and in this article, we’ll explore them.
Reverse Iterations
by Coral Kashri
From the article:
Probably the simplest way, taken from C is to iterate using an index location:
for(int64_tindex = ssize(container); index >= 0; --index) {// do something with `container[index]`}
This way is highly not recommended as it might lead to infinite loops if done incorrectly (for example by usinguint64_torsize_tfor the index type), and you can find more issues with this way in some previous articles about iterators in this blog.

In this article, you’ll see eight larger examples that illustrate the changes in C++23.
When tasked with diagnosing why a pointer passed through a pipeline emerged offset from its original value, I discovered an interesting culprit: the misuse of a wrapper function around
Back in the day, being a witch was considered a grave crime. Today, we’re diving into one of C++’s lesser-known spells: ADL (Argument-Dependent Lookup).