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] [DR 198] reverse iterator returns uninitialized values


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.


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