220 13753 <CAGNvRgBboQoJqTDOsL0H7KsGEMZObuOng0Wr9zrU6=yFUZBmVw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposing std::uninitialized_default /
 uninitialized_emplace algorithm
Date: Wed, 8 Oct 2014 11:10:03 +0200
Lines: 47
Approved: news@gmane.org
Message-ID: <CAGNvRgBboQoJqTDOsL0H7KsGEMZObuOng0Wr9zrU6=yFUZBmVw@mail.gmail.com>
References: <201410072114.05963.marc.mutz@kdab.com>
	<CAGNvRgCQJoXKx2q3VgKxQTjeUOteXgoKgoeN4+-EE0fLCVZsGA@mail.gmail.com>
	<5434AAA1.1090507@gmail.com>
	<835B0691-50CD-490A-86DF-83A709CC550D@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1412759418 24052 80.91.229.3 (8 Oct 2014 09:10:18 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 8 Oct 2014 09:10:18 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCT7RVFA4QORB2762OQQKGQEIQCQFPA@isocpp.org Wed Oct 08 11:10:09 2014
Return-path: <std-proposals+bncBCT7RVFA4QORB2762OQQKGQEIQCQFPA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f200.google.com ([209.85.220.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCT7RVFA4QORB2762OQQKGQEIQCQFPA@isocpp.org>)
	id 1XbnG1-0007Oo-B2
	for gclcip-std-proposals@m.gmane.org; Wed, 08 Oct 2014 11:10:05 +0200
Original-Received: by mail-vc0-f200.google.com with SMTP id ij19sf17834330vcb.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 08 Oct 2014 02:10:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type:content-transfer-encoding;
        bh=5dT6evDfqgn8nU/b8kP9NUx16UKiSmP44cLsGXNgVqM=;
        b=DNgHo++CXjgJrwHbVI6eXFLcV+K5S8nO8bO3H8vuhJbkEhR0vjpMa2N9P7L7cS288g
         ML/Ly6QjQOwwDeL/eXMdhjP2/Wi4yj+90jzxkaj6emEac55knhAas7nDKXN467PSIjzH
         DqbX4tbcxFAnK4pAdYDd2sFdi6JG4X2F5UZHrM8oCYZTH7Uc5qrr4AhGOjKRJgFl2mjf
         vBdtEM1QU2Ey7eqGhFiLDgoCpzxhYy0zV2RhekESPsf5ASkw3IxDCRl96HdZVDP5zYLX
         lpV3TDTkYPqY8dZumj4MkYLvjujZZHwhwHmBdyzj6Jxx/RCQVg82RmBtDUykSaNyZ7ZY
         Pucg==
X-Gm-Message-State: ALoCoQnwFBN9x/32tAcbkP/Kk5WhFtMANsNBtDkCu5t7Jy1DdEu5pUvLun6664LaHtiw4GNh3b25
X-Received: by 10.236.151.75 with SMTP id a51mr5765319yhk.45.1412759404444;
        Wed, 08 Oct 2014 02:10:04 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.137.65 with SMTP id qg1ls3624598igb.44.canary; Wed, 08 Oct
 2014 02:10:03 -0700 (PDT)
X-Received: by 10.42.63.197 with SMTP id d5mr11393875ici.75.1412759403639;
        Wed, 08 Oct 2014 02:10:03 -0700 (PDT)
Original-Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [2607:f8b0:4001:c05::229])
        by mx.google.com with ESMTPS id lz10si2140022icc.9.2014.10.08.02.10.03
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 08 Oct 2014 02:10:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of daniel.kruegler@gmail.com designates 2607:f8b0:4001:c05::229 as permitted sender) client-ip=2607:f8b0:4001:c05::229;
Original-Received: by mail-ig0-f169.google.com with SMTP id uq10so8776709igb.0
        for <std-proposals@isocpp.org>; Wed, 08 Oct 2014 02:10:03 -0700 (PDT)
X-Received: by 10.50.108.72 with SMTP id hi8mr4209921igb.39.1412759403325;
 Wed, 08 Oct 2014 02:10:03 -0700 (PDT)
Original-Received: by 10.107.42.67 with HTTP; Wed, 8 Oct 2014 02:10:03 -0700 (PDT)
In-Reply-To: <835B0691-50CD-490A-86DF-83A709CC550D@gmail.com>
X-Original-Sender: daniel.kruegler@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of daniel.kruegler@gmail.com designates 2607:f8b0:4001:c05::229 as
 permitted sender) smtp.mail=daniel.kruegler@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13753
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13753>

2014-10-08 10:25 GMT+02:00 Miro Knejp <miro.knejp@gmail.com>:
> On 08 Oct 2014, at 05:08 , John Bytheway <jbytheway@gmail.com> wrote:
>
>> On 2014-10-07 15:20, Daniel Kr=FCgler wrote:
>>> I have strong concerns in regard to emplace in that context. Basically
>>> everywhere "emplace" means a potential move of the provided arguments
>>> to construct a single object. This won't work for a potential
>>> multi-construction operation except for special cases (like empty
>>> packs or packs of lvalues to const). People will easily get that
>>> wrong. If you insist on copying the arguments, you could name it
>>> emplace_copy and ensure that the argument pack refers to references to
>>> const.
>
> In the context of the standard library functions labeled "emplace" simply=
 do in-place construction at the destination >location.

Yes, I'm aware of that.

>What happens to the arguments is solely the responsibility of the invoked =
constructor.

I'm not denying that, but in the existing contexts of "emplace"
functions the potential harm related to multiple references of the
same arguments to constructed objects does not occur.

> If you construct multiple >objects with the same arguments you better use=
 constructors that behave well in that scenario. But you probably do >want =
to receive arguments as lvalue references in this case just to be safe.

I do not recognize any difference of this response compared to the
arguments that I presented against using the name emplace here. It
would be misleading to use the same name for things that have very
difference semantics.

- Daniel

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
