This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] DR 438
- From: Howard Hinnant <hhinnant at apple dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 27 Apr 2007 15:50:00 -0400
- Subject: Re: [Patch] DR 438
- References: <46324171.7030804@suse.de>
On Apr 27, 2007, at 2:31 PM, Paolo Carlini wrote:
before implementing the allocator::construct / destroy removal, I
decided to take care of DR 438.
Overall, I think the issue is rather clear, basically we want to
cast less than we used to do, that is only the first argument in
the templated constructor, neither in assign, insert, etc.
I'd like to ask to Howard to have a look to the implementation of
his own DR, in particular to the testcases. Thanks in advance.
This looks good to me, including the test cases.
Note that the bit about static_cast<size_type>(f) is bogus (imho).
By the time that went in I was simply tired of arguing about this
issue. I think it is relatively harmless. However if you spot a use
case where it actually makes a difference, please let me know, and we
can file another DR to correct it. I do not understand the rationale
from Redmond on this part. As far as I can tell the static_casting
of f does not appear to me to actually do anything at all with
respect to the second parameter and value_type. And I have no idea
what "fixes" means in the rationale. vector<vector<int>>(5, 5) won't
compile with or without static_cast<size_type>(the first 5).
Thanks Paolo.
-Howard