From 5208361466685661750
X-Google-Thread: f78e5,4ae4d1cd1dd2d66c
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.68.130.35 with SMTP id ob3mr5032705pbb.8.1332354912287;
        Wed, 21 Mar 2012 11:35:12 -0700 (PDT)
MIME-Version: 1.0
Path: kz5ni17261pbc.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.albasani.net!.POSTED!not-for-mail
From: Francis Glassborow<francis.glassborow@btinternet.com>
Newsgroups: comp.std.c++
Subject: Re: Request =?ISO-8859-1?Q?f=F6r_std=3A=3Avector_and_possi?=
 =?ISO-8859-1?Q?bly_others=3A_minimal_initalization?=
Date: Wed, 21 Mar 2012 11:35:07 -0700 (PDT)
Organization: unknown
Lines: 16
Sender: std-cpp-request@vandevoorde.com
Approved: stephen.clamage@oracle.com
Message-ID: <vtidnTDJTMF2M_TSnZ2dnUVZ7sOdnZ2d@bt.com>
References: <abf103e0-7005-47b4-9888-af946353a525@v22g2000vby.googlegroups.com>
NNTP-Posting-Host: 1cu/qOB8gPGdcsfkiF5RHJ7JGpNa62RZcaFxu9+NITc=
X-Trace: news.albasani.net 0pkYqFwDqvIdwUMi/YAp6zqSn4eNq8PQYEL2JzO3759bbk+z0sir/UlF7y4w4/e3+cizhRmBFZ5niTO1lyqYgw==
X-Complaints-To: abuse@albasani.net
NNTP-Posting-Date: Wed, 21 Mar 2012 18:35:11 +0000 (UTC)
X-Mailer: Perl5 Mail::Internet v2.05
X-Submission-Address: std-cpp-submit@vandevoorde.com
Cancel-Lock: sha1:7om0F6351Im7oYLAK3xG7ghcJhM=
X-Original-Date: Wed, 21 Mar 2012 10:35:16 +0000
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 20/03/2012 06:35, henrikv wrote:
>  Hello group!
>
>  When writing parallel code, I often allocate a vector for results. I
>  allocate the complete vector with a single resize. What I'd like to do
>  is to tell the resize not to initialize the content, since this will
>  be overwritten anyway.

Isn't that what reserve() is for?


-- 
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]


