220 6372 <CAGNvRgDvTbTftF34CCwb_=Oh8gM2VY+C0yJvAF+89s3G1nKCaQ@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: Re: std::sink<T> to efficiently pass `sink` arguments
Date: Wed, 11 Sep 2013 15:39:50 +0200
Lines: 96
Approved: news@gmane.org
Message-ID: <CAGNvRgDvTbTftF34CCwb_=Oh8gM2VY+C0yJvAF+89s3G1nKCaQ@mail.gmail.com>
References: <c8da1b8c-becf-421e-b2c1-8cc561afb579@isocpp.org>
	<259bb492-64d5-4465-bd1c-08d58d9725ad@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7bf1985271388e04e61bc186
X-Trace: ger.gmane.org 1378906789 6877 80.91.229.3 (11 Sep 2013 13:39:49 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 11 Sep 2013 13:39:49 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCT7RVFA4QORBJ7FYGIQKGQEKO3OEXY@isocpp.org Wed Sep 11 15:39:53 2013
Return-path: <std-proposals+bncBCT7RVFA4QORBJ7FYGIQKGQEKO3OEXY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f200.google.com ([209.85.217.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCT7RVFA4QORBJ7FYGIQKGQEKO3OEXY@isocpp.org>)
	id 1VJke8-0003pn-ID
	for gclcip-std-proposals@m.gmane.org; Wed, 11 Sep 2013 15:39:52 +0200
Original-Received: by mail-lb0-f200.google.com with SMTP id y6sf8413718lbh.11
        for <gclcip-std-proposals@m.gmane.org>; Wed, 11 Sep 2013 06:39:52 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=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;
        bh=wFlnSu86lG6MrmSJA6Juu3CdDR//j6ANcKlsfV1GERs=;
        b=fmYL+88BuWLRyBZmrGjBAO899LH2eCtSrSJ19wpGjLFvi11NqBFlhGNN1oov0qnKop
         E6Yh7cTExu8ZTz1CoPl1/yRdYKm4DuPowSRIGvdHG32UFYnT6SrtKFFVog0KUz00ifeP
         IL4b8oHpmB/iyOJBZ8KnX5FEo274ajKxUewg9qM0B5TNBCZBvBqtnbR35EGTpGZvkolg
         5v7HANZ3T7xkKAf0rh1YwmDNp8RYVLIu4ZpQYuGG5PijG1g+95QDRd8qcAXlip4W6f+m
         StxJ3KUoQnaKwcgAjokswgHD6W0Eeugd4LSbep1bUUOkf+vYW74N4zBBdltfIP73gkYr
         sL9A==
X-Received: by 10.180.21.198 with SMTP id x6mr5624276wie.2.1378906791963;
        Wed, 11 Sep 2013 06:39:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.181.11.227 with SMTP id el3ls140899wid.22.gmail; Wed, 11 Sep
 2013 06:39:50 -0700 (PDT)
X-Received: by 10.180.187.202 with SMTP id fu10mr17553553wic.9.1378906790870;
        Wed, 11 Sep 2013 06:39:50 -0700 (PDT)
Original-Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [2a00:1450:400c:c05::236])
        by mx.google.com with ESMTPS id v18si5075368wib.14.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 11 Sep 2013 06:39:50 -0700 (PDT)
Received-SPF: pass (google.com: domain of daniel.kruegler@gmail.com designates 2a00:1450:400c:c05::236 as permitted sender) client-ip=2a00:1450:400c:c05::236;
Original-Received: by mail-wi0-f182.google.com with SMTP id ez12so2208709wid.15
        for <std-proposals@isocpp.org>; Wed, 11 Sep 2013 06:39:50 -0700 (PDT)
X-Received: by 10.194.104.42 with SMTP id gb10mr1645760wjb.16.1378906790768;
 Wed, 11 Sep 2013 06:39:50 -0700 (PDT)
Original-Received: by 10.216.153.8 with HTTP; Wed, 11 Sep 2013 06:39:50 -0700 (PDT)
In-Reply-To: <259bb492-64d5-4465-bd1c-08d58d9725ad@isocpp.org>
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 2a00:1450:400c:c05::236 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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:6372
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6372>

--047d7bf1985271388e04e61bc186
Content-Type: text/plain; charset=ISO-8859-1

2013/9/11 Vittorio Romeo <vittorio.romeo.vee@gmail.com>

> Sorry for the duplicate thread. As Jonathan Wakely suggested, let's just
> use this one to avoid unnecessary duplication.
>
> In the other thread, *Jared Grubb* mentioned:
>
>> At GoingNative last week, someone mentioned that "move elision" will
>> (probably?) be added to the standard. That means the compiler is allowed to
>> remove moves in the same way compilers are allowed to remove copies.
>> I think that would apply to your example, and so the results would just
>> be "1 move" and "1 copy", respectively. But, ask a guru, since I'm not 100%
>> certain.
>
>
> *Jonathan Wakely* replied to him:
>
>> That's already allowed in C++11.
>>
>
>  This sounds a good solution. However, searching online for "move elision"
> returns 0 relevant results.
> Can someone confirm this?
>

The standard does not have a separate name for it, so there exists not the
term "move elision".  The definition of copy elision starts as follows:

"This elision of copy/move operations, called copy elision, is permitted in
the following circumstances [..]"

- Daniel

-- 

--- 
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 email 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-proposals/.

--047d7bf1985271388e04e61bc186
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">2013=
/9/11 Vittorio Romeo <span dir=3D"ltr">&lt;<a href=3D"mailto:vittorio.romeo=
..vee@gmail.com" target=3D"_blank">vittorio.romeo.vee@gmail.com</a>&gt;</spa=
n><br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir=3D"ltr">Sorry for the duplicate thread. As=A0<span style=3D"white-=
space:nowrap"><span>Jonathan Wakely</span></span><span style=3D"white-space=
:nowrap">=A0suggested, let&#39;s just use this one to avoid unnecessary dup=
lication.<br>
<br>In the other thread, <b>Jared Grubb</b>=A0mentioned:</span><div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex">At GoingNative last week, someon=
e mentioned that &quot;move elision&quot; will (probably?) be added to the =
standard. That means the compiler is allowed to remove moves in the same wa=
y compilers are allowed to remove copies.=A0<br>
I think that would apply to your example, and so the results would just be =
&quot;1 move&quot; and &quot;1 copy&quot;, respectively. But, ask a guru, s=
ince I&#39;m not 100% certain.</blockquote><div><br></div><div><b>Jonathan =
Wakely</b>=A0replied to him:</div>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">That&#39;s already allowe=
d in C++11.<br></blockquote><div><br></div><div>=A0This sounds a good solut=
ion. However, searching online for &quot;move elision&quot; returns 0 relev=
ant results.</div>
<div>Can someone confirm this?</div></div></div></blockquote><div><br></div=
><div>The standard does not have a separate name for it, so there exists no=
t the term &quot;move elision&quot;.=A0 The definition of copy elision star=
ts as follows:<br>
<br>&quot;This elision of copy/move operations, called copy elision, is per=
mitted in the following circumstances [..]&quot;<br><br></div><div>- Daniel=
 <br></div></div></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--047d7bf1985271388e04e61bc186--

.
