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 #7 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-11 15:16:58 UTC ---
Paolo started a discussion on this:
http://gcc.gnu.org/ml/libstdc++/2003-11/msg00089.html
but apparently the code wasn't changed. It is really sad that in most cases the
size of reverse_iterator is needlessly doubled just so some rare fancy
iterators can use it. And other fancy uses prevent from using a global instead
(even a tls).

For the special case of a Iota_iterator, when the C++ iterator concept is
eventually fixed (or for people who decide to ignore the requirement that
reference be a reference), reference should be int, not int const&, so
operator* would return by value.


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