This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/31370] resizing bugs in std::vector<bool>
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2007 20:03:05 -0000
- Subject: [Bug libstdc++/31370] resizing bugs in std::vector<bool>
- References: <bug-31370-14320@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pcarlini at suse dot de 2007-03-27 21:03 -------
Two quick replies:
> 4.2 doesn't fix any of the problems, but it does make the max_size
> issue a bit more confusing.
Thanks, this is encouraging ;) In any case, nobody said 4.2 fixed any of those
problems. However, for sure, any proposed patch / fix targets first mainline,
not the release branches.
> Note that it probably isn't correct to assume that difference_type is
> a ssize_t, and therefore has maximum SSIZE_MAX, but I don't see what
> the correct way to ask what the maximum value representable by
> difference_type is.
Why not numeric_limits<difference_type>::max() ?
> I'm fine with filling out copyright assignment paperwork, but I didn't see the
> form at the link you gave me.
Again, nobody said the form was there. I pointed you at that general
information page because I was under the - probably not too far from the truth
- impression that you was not familiar with our general directions for
contributors. If you need the forms, please send a message to assignments@.
In any case, that kind of paperwork is not needed for the present work, but, if
possible, please let's figure out a way to deal with the issues in a "C++"
(C++03, actually) way, which means using numeric_limits, not assuming specific
types for difference_type, size_type and so on, not using types likes ssize_t
which do not exist in the current C++ standard (*). Finally, I repeat myself,
any patch shall target mainline first.
I look forward to see your improved proposal.
(*) ssize_t is mentioned only once, in note 266. If we really need a type
equivalent for all practical matters to such Posix type, we have to find a way
to construct one on the fly, for example by implementing an __add_signed
(similar to the currently available __add_unsigned, in ext/type_traits.h)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31370