From 362044442394132535
X-Google-Thread: f78e5,4ae4d1cd1dd2d66c
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
Received: by 10.68.231.138 with SMTP id tg10mr15383287pbc.7.1332642304469;
        Sat, 24 Mar 2012 19:25:04 -0700 (PDT)
MIME-Version: 1.0
Path: kz5ni30512pbc.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.albasani.net!.POSTED!not-for-mail
From: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.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: Sat, 24 Mar 2012 19:25:02 -0700 (PDT)
Organization: A noiseless patient Spider
Lines: 33
Sender: std-cpp-request@vandevoorde.com
Approved: james.dennett@gmail.com
Message-ID: <jkk2dv$dn8$1@dont-email.me>
References: <abf103e0-7005-47b4-9888-af946353a525@v22g2000vby.googlegroups.com>
 <vtidnTDJTMF2M_TSnZ2dnUVZ7sOdnZ2d@bt.com>
 <2bd4117e-d3cb-436f-b1a9-f08971dbdce2@h5g2000vbx.googlegroups.com>
NNTP-Posting-Host: ePVbKGMCaheKZJjGMv/3r4MNeN5u8Q3aDLqbxV47Pa8=
X-Trace: news.albasani.net NYqgg2m9Uq2uE89XNcvLplnt4kQ13CS9LB+DWUw5C5yzD6u5Fr2DTSi+vG7IG3t5IdN280n8u67gDOY2jwTCzg==
X-Complaints-To: abuse@albasani.net
NNTP-Posting-Date: Sun, 25 Mar 2012 02:25:03 +0000 (UTC)
X-Mailer: Perl5 Mail::Internet v2.05
X-Submission-Address: std-cpp-submit@vandevoorde.com
Cancel-Lock: sha1:gHsfbe5hT5UhzRxuVFq5jpsG27c=
X-Original-Date: Sat, 24 Mar 2012 09:59:54 +0100
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Am 24.03.2012 01:09, schrieb henrikv:
>
> On 21 mar, 19:35, Francis
> Glassborow<francis.glassbo...@btinternet.com>   wrote:
>>
>>  Isn't that what reserve() is for?
>
>
> What I want to do is to allocate a vector for results calculated in a
> parallel loop. Reserve+push_back will not work, since it's not
> guaranteed that results will be stored in a predictable order. You
> might even get multiple push_back's executed at once, which I suspect
> isn't a great idea.


What you describe sounds like a data race to me, so every normal
assumptions have lost their foundation.

Please elaborate in more detail, but speculating upon games with
undefined behaviour doesn't look like something that the Standard
Library should pro-actively support.

HTH & Greetings from Bremen,

Daniel Kr�gler



--
[ 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                      ]


