This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51823] reverse iterator instantiated with POD type returns uninitialized values + work around
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jan 2012 13:16:16 +0000
- Subject: [Bug libstdc++/51823] reverse iterator instantiated with POD type returns uninitialized values + work around
- Auto-submitted: auto-generated
- References: <bug-51823-4@http.gcc.gnu.org/bugzilla/>
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