This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/51823] reverse iterator instantiated with POD type returns uninitialized values + work around


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-11 13:16:16 UTC ---
(In reply to comment #0)
> Consider an iterator class that implements the requirements of a
> forward_iterator. We underlying datatype is always POD and the operator*()
> member of the iterator returns the results by value, since it is POD anyway.

The iterator requirements [iterator.iterators] say operator* must return
iterator_traits<some_iterator>::reference


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]