This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/15523] Can't have vectors of vector::const_iterator
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2004 14:24:05 -0000
- Subject: [Bug libstdc++/15523] Can't have vectors of vector::const_iterator
- References: <20040518193757.15523.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-19 14:24 -------
I see your point, although 24.1/5 only speaks about "most operations" and
does not specifically rule out that we do the sensible thing here. I
think my point is that I fail to see the value of this check, since it
seems to be allowed to create such an iterator, but not to copy it. On
the other hand, if we simply omitted the check we would fall over later
if we ever tried to dereference it. The only thing that one would have
to make sure is that the result of assigning a singular iterator to
another iterator is again a singular iterator, but that should be what
happens anyway if we simply copy all member variables.
I don't feel strongly either way, since I already fixed my code to
work around this, but I do feel that there are cases where one would
like to generate a vector of singular iterators, and only after that
assign individual values to them.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15523