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++/23767] std::vector iterator implementation wrong


------- 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


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