From -7681100358832460051
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8e45f00ca435d49d
X-Google-Attributes: gidf78e5,public
From: James Kuyper <kuyper@wizard.net>
Subject: Re: fundamental allocator design question.
Date: 2000/05/26
Message-ID: <392D1EA2.973DBAB2@wizard.net>#1/1
X-Deja-AN: 627220218
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <m3wvkj4lva.fsf@cadence.glidepath.org>
X-Accept-Language: en,de,es,ru
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Content-Type: text/plain; charset=us-ascii
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 959271950 mail2news:14894 mail2news mail2news.demon.co.uk
Organization: Not Enough
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
MIME-Version: 1.0
NNTP-Posting-Date: Thu, 25 May 2000 08:30:53 EDT
Newsgroups: comp.std.c++

Marc D Bumble wrote:
> 
> Is there  an oversight in the allocator  definitions?  Allocators take
> one  template  type parameter.   The  allocator then provides  memory
> having the same type as specified by its single parameter.  And all of
> this works  well.  However,  it might be  beneficial if  the allocator
> also took a second parameter which described the type of the allocator
> itself.  For instance, a user could specify:
> 
>    allocator<int,shared>
>    allocator<int,pooled>
>    allocator<string,persistent>

std::allocator<> takes a template type parameter, but the general
allocator requirements in section 20.1.5 make no mention of template
parameters. They don't say that a type parameter is needed, and they
don't prohibit the presence of additional parameters.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




