From 8850874370283277712
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,839fa42e97baea86
X-Google-Attributes: gidf78e5,public
From: "Paul D. DeRocco" <pderocco@ix.netcom.com>
Subject: Re: Placement new[] Compiler Depenent?
Date: 1998/11/28
Message-ID: <365E3269.700D8252@ix.netcom.com>#1/1
X-Deja-AN: 416620150
X-NNTP-Posting-Host: prt-or1-33.ix.netcom.com
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
References: <eDcSHHgdulIC-pn2-e3Hcgbrpl1Vl@eir.stiscan.com> <36539CEC.F0CFB047@ix.netcom.com> <3655B49B.97D17F08@prolifics.com> <73hnkv$d5t$1@nnrp1.dejanews.com>
Content-Type: text/plain; charset=us-ascii
Organization: Vast Right-Wing Conspiracy
X-NETCOM-Date: Fri Nov 27  2:03:55 AM CST 1998
Mime-Version: 1.0
Newsgroups: comp.std.c++
Originator: clamage@taumet


AllanW@my-dejanews.com wrote:
> 
> It would be easy to construct
> a template function that constructs an array of any class
> given a buffer address and a number of elements...

The uninitialized_copy, uninitialized_fill and uninitialized_fill_n
functions in STL do exactly this.

> ...and another one that destructs all of the elements.

I don't see a standard version in STL, but the implementation I've got
(HP->Rogue Wave->Borland) has an internal helper function that does
this.

-- 

Ciao,
Paul


[ 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              ]




