This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51823] [DR 198] reverse iterator returns uninitialized values
- 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 15:25:42 +0000
- Subject: [Bug libstdc++/51823] [DR 198] reverse iterator returns uninitialized values
- Auto-submitted: auto-generated
- References: <bug-51823-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51823
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|reverse iterator |[DR 198] reverse iterator
|instantiated with POD type |returns uninitialized
|returns uninitialized |values
|values + work around |
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-11 15:25:42 UTC ---
Thanks, Marc, I'd failed to find the relevant DR number
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198
We could specialize reverse_iterator on a trait that says the extra member
isn't needed, and then make that trait true for all iterator types defined in
the library. The size would still change for
reverse_iterator<user_defined_iterator> but I don't see how else to meet the
requirement.