constreverseiterator
A const_reverse_iterator is a read-only reverse iterator used to traverse a container in reverse order. It is the const version of a reverse iterator, meaning that dereferencing yields a const reference to the element and the element cannot be modified through the iterator. This type is provided by the C++ standard library for standard containers such as vector, deque, list, set, and map, typically as a nested typedef named const_reverse_iterator.
In most containers, const_reverse_iterator is defined as reverse_iterator<const_iterator>, where const_iterator is the container’s iterator type that
The base() member function returns the corresponding underlying iterator, typically a const_iterator, pointing to the element
Since const_reverse_iterator enforces constness, it is commonly obtained via crbegin and crend (introduced in C++17) to
Overall, const_reverse_iterator provides a standard, read-only means to traverse containers in reverse, complementing reverse_iterator and const_iterator