220 21346 <BLU436-SMTP228EEA3C501F8822B9D7DD8A7370@phx.gbl> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?Agust=c3=adn_K-ballo_Berg=c3=a9?= <kaballo86@hotmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Conversion from lvalue to rvalue
Date: Tue, 6 Oct 2015 09:51:58 -0300
Lines: 42
Approved: news@gmane.org
Message-ID: <BLU436-SMTP228EEA3C501F8822B9D7DD8A7370@phx.gbl>
References: <f8a1e157-ae9a-40f8-9bc1-5aff59eefc10@isocpp.org>
 <31dedac5-7d51-402c-946e-0555c925f70d@isocpp.org>
 <d165db3c-7593-4663-b93e-c37eb8628635@isocpp.org>
 <116a66a2-90ea-4269-ac85-3432ff7094b0@isocpp.org>
 <42447957-4276-4f59-89b6-ab4be37c47c6@isocpp.org>
 <ff062d43-3aa3-4d6d-8c64-a2582e7d0ca8@isocpp.org>
 <BLU437-SMTP37170683138BE594B7E3E1A7370@phx.gbl>
 <2C19913E-B6BC-423D-8570-939C3A573CDF@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1444135933 26981 80.91.229.3 (6 Oct 2015 12:52:13 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 6 Oct 2015 12:52:13 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD2JZ7PP7QERB4MHZ6YAKGQETESIT7Y@isocpp.org Tue Oct 06 14:52:04 2015
Return-path: <std-proposals+bncBD2JZ7PP7QERB4MHZ6YAKGQETESIT7Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qg0-f69.google.com ([209.85.192.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD2JZ7PP7QERB4MHZ6YAKGQETESIT7Y@isocpp.org>)
	id 1ZjRit-0004qb-A5
	for gclcip-std-proposals@m.gmane.org; Tue, 06 Oct 2015 14:52:03 +0200
Original-Received: by qgev79 with SMTP id v79sf224690207qge.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 06 Oct 2015 05:52:02 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:subject:to:references:from:date
         :user-agent:mime-version:in-reply-to:content-type
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=hN9VqUP5mxsC6rx1m4DphfZyBWtHfPDj73YtQpqBygo=;
        b=COBFWgSOsAbT+cgoKM4tRrI48+L6fGq4sZl5kYqZn1SNXc8VcjqjnYSVMMGLayV/5I
         kTIGpBZPACt0MpqPfW5KifB5BQo9sHERSgsvClGFV+5tofht4zDlkzkNg1FTHakf9dbQ
         8ZJkFg+RNr1Z9Id+anl3G2eKNPBU1FoSQb0uaWhQJnap4ID99zwlCJhVxA11H3d8KKxR
         grYT81yhaGOLSrVEVrbwdxoUjoJ/PKu63R0C+iW+6JN0tr4GqxqCcJLGtWNf8sjxtOaG
         e6ZWiSIuPce5bPhvxEuogleiW91ZyxCNFZprAU5Abti4dgx 
X-Gm-Message-State: ALoCoQnDZ4fhbVA6yL6LekDyknmkFhfdkqu0fNhxYz9COLDzdoOpKqRN7u0gha7cWC5Mx483jlBi
X-Received: by 10.129.145.68 with SMTP id i65mr29025829ywg.1.1444135922299;
        Tue, 06 Oct 2015 05:52:02 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.251.198 with SMTP id zm6ls1557853obc.33.gmail; Tue, 06 Oct
 2015 05:52:01 -0700 (PDT)
X-Received: by 10.60.46.168 with SMTP id w8mr21695074oem.82.1444135921212;
        Tue, 06 Oct 2015 05:52:01 -0700 (PDT)
Original-Received: from BLU004-OMC1S23.hotmail.com (blu004-omc1s23.hotmail.com. [65.55.116.34])
        by mx.google.com with ESMTPS id j8si16088574obz.28.2015.10.06.05.52.01
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Tue, 06 Oct 2015 05:52:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of kaballo86@hotmail.com designates 65.55.116.34 as permitted sender) client-ip=65.55.116.34;
Original-Received: from BLU436-SMTP228 ([65.55.116.8]) by BLU004-OMC1S23.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008);
	 Tue, 6 Oct 2015 05:52:00 -0700
X-TMN: [Pa34X24f3ALBpJflRG3h/EIhsA0PivIT]
X-Originating-Email: [kaballo86@hotmail.com]
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.3.0
In-Reply-To: <2C19913E-B6BC-423D-8570-939C3A573CDF@gmail.com>
X-OriginalArrivalTime: 06 Oct 2015 12:51:59.0395 (UTC) FILETIME=[CA12C730:01D10035]
X-Original-Sender: kaballo86@hotmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of kaballo86@hotmail.com designates 65.55.116.34 as permitted sender)
 smtp.mailfrom=kaballo86@hotmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=hotmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:21346
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21346>

On 10/6/2015 4:34 AM, David Krauss wrote:
>
>> On 2015=E2=80=9310=E2=80=9306, at 9:37 AM, Agust=C3=ADn K-ballo Berg=C3=
=A9
>> <kaballo86@hotmail.com <mailto:kaballo86@hotmail.com>> wrote:
>>
>> This would do wasteful copies from rvalues. If you look at 30.2.6
>> [thread.decaycopy] you'll see it's defined as:
>>
>>    template <class T> decay_t<T> decay_copy(T&& v)
>>      { return std::forward<T>(v); }
>>
>> I guess `auto` would do too.
>
> decay_copy would always perform a copy, from an lvalue, xvalue, or prvalu=
e.
>
> auto{} would allow copy elision for prvalue operands. It would copy
> lvalue, xvalue, and derived-type prvalues.

I don't know where this comes from. Since it says `auto` I'll assume is=20
about it being an option too. I meant this:

     template <class T> auto decay_copy(T&& v)
       { return std::forward<T>(v); }

Regards,
--=20
Agust=C3=ADn K-ballo Berg=C3=A9.-
http://talesofcpp.fusionfenix.com

--=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/.

.
