------- Additional Comments From chris at bubblescope dot net  2005-08-30 20:16 
-------
Just so we are 100% clear on what is occuring (I realise it might not be 
obvious from my message)

M.rbegin() returns an iterator i =  std::reverse_iterator(M.end());

*i therefore returns *--(M.end()), which at first is the same as M.begin().

After we stick some more stuff into the container, then *i (which is still 
equal *--(M.end())) becomes 
something different, as more stuff has been pushed into the container.

This is exactly what the standard requires we do, it's just unfortunatly that 
reverse_iterator is a little fragile 
in the presence of changing containers.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23633

Reply via email to