Since C++20 you can make use of the range adaptor std::views::reverse from the Ranges library. If you add this to a range-based for loop with structured binding, iterating backwards over an std::map
could be done as follows:
#include
Output:
c => 3
b => 2
a => 1
Code on Wandbox