This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/23767] std::vector iterator implementation wrong
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2005 19:22:26 -0000
- Subject: [Bug libstdc++/23767] std::vector iterator implementation wrong
- References: <20050907170304.23767.afra@cs.stanford.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From chris at bubblescope dot net 2005-09-07 19:22 -------
Hmm.. this is I believe a bug, but a very hard one to trigger.
1) This bug is very sensitive. It only occurs if the const_iterator member function is const and the
iterator member function isn't. It doesn't appear for a pair of normal functions.
2) Just to point it out, if you try only allowing the first function t(iterator f), then the code won't compile,
as it tries and fails to instansiated the templated constructor.
The "obvious" way to fix this would be to change the templated constructor so that it only took the
const version of the iterator. Unfortunatly I don't believe thats possible without passing extra
information by more template parameters, which would break binary compatability.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23767