http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51823
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Last reconfirmed| |2012-01-11 Resolution|INVALID | Ever Confirmed|0 |1 --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-11 14:17:34 UTC --- actually, my bad, even if your type did meet the requirements it wouldn't work, and that *is* a libstdc++ bug at some point between C++03 and C++11 the definition of reverse_iterator::operator* was changed to clarify this, making libstdc++'s implementation wrong. The standard now says: [ Note: This operation must use an auxiliary member variable rather than a temporary variable to avoid returning a reference that persists beyond the lifetime of its associated iterator. (See 24.2.) —end note ]