This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/31247] std::vector::iterator::value_type is accessible
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Oct 2011 09:31:30 +0000
- Subject: [Bug libstdc++/31247] std::vector::iterator::value_type is accessible
- Auto-submitted: auto-generated
- References: <bug-31247-4@http.gcc.gnu.org/bugzilla/>
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.