[Bug libstdc++/31247] std::vector::iterator::value_type is accessible
marc.glisse at normalesup dot org
gcc-bugzilla@gcc.gnu.org
Fri Oct 28 09:32:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31247
Marc Glisse <marc.glisse at normalesup dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marc.glisse at normalesup
| |dot org
--- Comment #10 from Marc Glisse <marc.glisse at normalesup dot org> 2011-10-28 09:31:30 UTC ---
Just noticed this accidentally while looking for something else. And I am
opposed to hiding the standard typedefs (particularly iterator_category), even
in some debug mode. An iterator is either a pointer or a class with the
typedefs. If you want to portably detect iterators (for sfinae purposes),
that's exactly what you'll test, since iterator_traits is not guaranteed to be
sfinae-friendly.
On the other hand, I would not be opposed to a signature: iterator&
operator--()&; for the decrement operator (notice the final '&') when support
appears in the compiler. Next time I read --v.end()...
Note that IIRC Howard's libc++ uses pointers, which should make those issues
more visible.
More information about the Gcc-bugs
mailing list