I\'m trying to figure out the best way to determine whether I\'m in the last iteration of a loop over a map in order to do something like the following:
for
For someone who likes C++11 range-based loop:
for (const auto& pair : someMap) { if (&pair != &*someMap.rbegin()) ... }
Notice only reference type works here, not auto pair
auto pair