This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3 patch] Implement LWG 2466 (allocator_traits::max_size() is stoopid)
- From: Martin Sebor <msebor at redhat dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>, libstdc++ at gcc dot gnu dot org
- Date: Wed, 13 May 2015 08:26:36 -0600
- Subject: Re: [v3 patch] Implement LWG 2466 (allocator_traits::max_size() is stoopid)
- Authentication-results: sourceware.org; auth=none
- References: <20150513122130 dot GE30202 at redhat dot com>
On 05/13/2015 06:21 AM, Jonathan Wakely wrote:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2466
We agreed to move this to Ready in Lenexa.
I'd like to see max_size() deprecated, it's useless, but if we can't
do that it might as well not give an impossible answer.
FWIW, I think it's unfortunate that the LWG decided in their
response to issue 197 to leave max_size so poorly specified
as to render it useless.
The function can be made useful by having each container use
Allocator::max_size in determining its maximum size. It doesn't
cost anything in terms of efficiency (for the default Allocator)
but allows programs to provide a specialized Allocator that
returns a value that controls the size of each container object.
We implemented this in response to user requests and I found
it quite useful myself when testing the containers.
Martin