I\'m writing some cross-platform code between Windows and Mac.
If list::end() \"returns an iterator that addresses the location succeeding the last element in a list
Use reverse_iterator instead of iterator. Use rbegin() & rend() instead of begin() & end().
Another possibility, if you like using the BOOST_FOREACH macro is to use the BOOST_REVERSE_FOREACH macro introduced in Boost 1.36.0.