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: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2008 15:51:59 -0000
- Subject: [Bug libstdc++/31247] std::vector::iterator::value_type is accessible
- References: <bug-31247-1902@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jwakely dot gcc at gmail dot com 2008-03-09 15:51 -------
Created an attachment (id=15284)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15284&action=view)
make nested iterator typedefs private in debug mode
It's "accepts implementation-defined" not "accepts invalid" - and it's
obviously by design that GCC accepts its own implementation-defined constructs!
This patch makes the typedefs inaccessible in debug mode and fixes up a couple
of functions that refer to them directly, rather than through iterator_traits.
Tested x86_64/linux. I also tried testing with -D_GLIBCXX_DEBUG added to
testsuite_flags but got lots of spurious failures that I don't think are
related to this change (as with parallel mode testing, all the
23_containers/*/synopsis.cc tests fail in debug mode - I haven't investigated
why)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31247