220 36411 <CAKqmYPbnrh-dDTA7HAGuGZkgphtPRr6AYCXtuTUWesEBzbCUNQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Antony Polukhin <antoshkka@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Sub-objects and their copy ellision
Date: Thu, 28 Dec 2017 11:02:32 +0300
Lines: 80
Approved: news@gmane.org
Message-ID: <CAKqmYPbnrh-dDTA7HAGuGZkgphtPRr6AYCXtuTUWesEBzbCUNQ@mail.gmail.com>
References: <caca241d-3498-b79b-fbf3-e57d8b7c3518@technion.ac.il>
 <1c6eff77-d71f-4dd7-8c13-f609460a03f0@isocpp.org> <c14fe13b-a658-e295-40a6-1465638d18db@technion.ac.il>
 <3ec0bd22-b228-4026-bb49-aec5102918c7@isocpp.org> <CAKqmYPbdMjxUOp9u+Ercx+eYjvUJvAn+CZe5EDpgGd4vaz47ag@mail.gmail.com>
 <AD4FF975-B9C1-43C2-8214-07665ECDBA52@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="f403045e9f503551d0056161f054"
X-Trace: blaine.gmane.org 1514448037 17248 195.159.176.226 (28 Dec 2017 08:00:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 28 Dec 2017 08:00:37 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDR7DZXHY4MRBGOKSLJAKGQETNIFHZI@isocpp.org Thu Dec 28 09:00:32 2017
Return-path: <std-proposals+bncBDR7DZXHY4MRBGOKSLJAKGQETNIFHZI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDR7DZXHY4MRBGOKSLJAKGQETNIFHZI@isocpp.org>)
	id 1eUT7A-00049y-Ha
	for gclcip-std-proposals@m.gmane.org; Thu, 28 Dec 2017 09:00:32 +0100
Original-Received: by mail-lf0-f69.google.com with SMTP id o203sf3577118lff.4
        for <gclcip-std-proposals@m.gmane.org>; Thu, 28 Dec 2017 00:02:35 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1514448155; cv=pass;
        d=google.com; s=arc-20160816;
        b=lSE2V4Uzf7aFW33ONhCTl822GeFUcJZ/eF7MGokbHGv0JXPu1AuoEHw8S+S43IFg7p
         zWVDO3DEg3TzExqhbjCcWyeh0AYhHA3eokovvh5G+Wxheb5UBR7bwi6rxhYJ2Q9twGNa
         Tlf8wEmIUh5nAJ3mnDS+/C3l+5J/sZ/XFNc5BBnLjcaoq4N+bS7FNY3n/Em8rHTbNmw6
         ahdqTgJDJrw6IQRo0rkubg53NTTFP+P+La5JHdi7bjOfcGZ0p/JiMJkJWph+HBDxT2c/
         cAuZsxPeZf3pWYGdV5+7R74IAxxZuqAU04PwrHbctLnCPu1/ruq2whiCTZIVdnkjEJkD
         narQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=Jw9JjFvctKJ1lIVWwkDGEtmAWOU2nYudfEcoEysmpJI=;
        b=xvveHiicrmxUcsc+v0WKwtktJQNwI+GZhpomSCAsLG3vL78ePFSx3UctmR7Rz/rqRg
         76tgiMLAWyCWOt5iqfUlNK6KyBWV+egk+2sRkQJXJNUlce1E0oAqsFjGEVlgx5/uwBpP
         CjL4v2O080A0iWmjZxoglTQx39+vzqZq8UXobGEw2iM6HWUPAJ9n1vCWfeS70fjFz+cL
         HQMWAIUDEW7WhjHsKG+LGeIT42FMYIbNdtdG7dglZnfUvVOOqzuNAJ/POZ+u26Eu9KXI
         1KZwwLBZYYI8b9tYO++NblhPy+aWAcRwaiFIXusAFM8cOX70CvfxPPtk3d6fAkRcM97w
         lZJw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=WTggP5jc;
       spf=pass (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=antoshkka@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject: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;
        bh=Jw9JjFvctKJ1lIVWwkDGEtmAWOU2nYudfEcoEysmpJI=;
        b=t20xZlFwcGVw1532qlwUfi/W6bG4qV4eSXVqb1fk0guaOSFp+Zpog6RTqTmHOlQgce
         Ll4jw+qqcppWYlxpSyb0j4fpy5VoGH09AZT7KsHNUIX16ZxEtHFMMVXaDRyHf6eFSHBW
         UNJKOnA73DiAen3oCyoWIIuzLkGVQ+C14qNjCChQhrxqbaPk7d47BeQJI4ixZACp0sxB
         0+LNyT/GmHy5ko+GpWLeGQHwpj0SCbJ/KC6QiU9ui70d7Q3dJX2nEVq+4kj+/AMlFT5n
         LlpfXxkTkU2LdgTmtTZtOiWIetX0qha/yyHiJ3/0MwihphAdwGeQnZOWif+InouG8HbZ
         d6OA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to: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=Jw9JjFvctKJ1lIVWwkDGEtmAWOU2nYudfEcoEysmpJI=;
        b=dMObQZ4RKE1pxd18U1iPt71BIwUxkwQXUrMbUMK6h1jHgwih2mKgPSHXrXxf2iE0Y4
         Sx+/o1uBMYTmZgvu7Fu23bX2a2SZeyxyWElPU5CF+rFuMBG+rn8PJXYk0Tvltgp7w0eW
         8GTtxWACg80UfsQ0X1GZfswnegtoVk3Y0kkJNYIjQzlicr3/Orcg0jU8kB8aBhOWM7Uf
         +nWoKucFX7sygDNJ8nZU4zNsgFCkzXsg1FVtlZMOfxH/Bbtw5iS64bG1YP1UPZnIVR50
         OJltxAF8rsUDJy/nLE5CeRqhGzFfTN4pcL0fx3vJkaRWeXBtmPz60y8nCf8+oiX/hxCT
         gnLw==
X-Gm-Message-State: AKGB3mI1jVHlgOBHkxb666wS+C0QrgxhNgPFiB1epQIDOWobuXw5h2jY
	ZMp338cdDEUMy2f0CIOI8P64wQ==
X-Google-Smtp-Source: ACJfBouQn4DeuHj8WE5Go3aoiBZBL31YURITknhO6Yq9BsmP5lREZfAxk9vZoj8sS/Nejkj5p9aaQQ==
X-Received: by 10.25.125.135 with SMTP id y129mr158559lfc.31.1514448155333;
        Thu, 28 Dec 2017 00:02:35 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.46.20.11 with SMTP id u11ls1990059ljd.9.gmail; Thu, 28 Dec
 2017 00:02:33 -0800 (PST)
X-Received: by 10.46.93.91 with SMTP id r88mr18518327ljb.39.1514448153677;
        Thu, 28 Dec 2017 00:02:33 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1514448153; cv=none;
        d=google.com; s=arc-20160816;
        b=sw1/SbKcMYD9gMAOu2lsKn7t3r5l02xypzJMNi8u2RR1dbfqNojhap6lLnmB1cpgKc
         GS18ymwmM4MdjYr6GMYD8qLC18Dx8hfN5iEkxK/ToEWV31k0NBhFDlwGWXDqCZODeIDO
         FEc5BHVtZe32mXoSF7617MDPlxVQyzllk034vcYnXXuRHx0o77tIGFOCUDbqw0w5V6Bh
         EVu2dL3WoMULV7nYH3C4gcCp0r5Q/90AcrEa5zy5q2vLPrOJ503dYFMRLqYsPfBDNyXr
         lZTjCDEHSReU88CZx76C9phgWLq5vJOQ+kEHOlfclrf+QSbGNyYRqNrbc8mbgx8+3MmS
         LIPQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=VCGIPDkBs8/DGqCGN4ATirt6Z/aL2RRwZqJEdrufUZY=;
        b=xz9mBDjN34dashk2zbRmwCb5XOV33bl0utSRuEalqUSTvQM14eOo0LG2AzVLX+gLRn
         CKlKfCDSUjtv8VLV3ZR5mRxC3v7OjIV81tpupF5w692hQoROqZLIlkisXHd86tAVYtTw
         O+IbGa1BGUJyj1oWG0ox/ZGImc67EX/ixf+0mQtB20ZwzLzOtl+H9KqE7YELfUD6MgAX
         085dGEY8Ca2V/Rx8qaxPNCr8KL+Kb/nznUuXrc/0L9b44zP/i73/xj4k3NhFlRdg5ENr
         UpwnzSnb6cMky0SSn9DE6jX/l79D+zHDJZlAj/D6I0cwDBJT9nAC7Pp+UMrKdMPWw+c/
         feVw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=WTggP5jc;
       spf=pass (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=antoshkka@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id a80sor5234903lfb.15.2017.12.28.00.02.33
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Thu, 28 Dec 2017 00:02:33 -0800 (PST)
Received-SPF: pass (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.25.202.83 with SMTP id h19mr6330762lfj.97.1514448153299;
 Thu, 28 Dec 2017 00:02:33 -0800 (PST)
Original-Received: by 10.25.215.210 with HTTP; Thu, 28 Dec 2017 00:02:32 -0800 (PST)
In-Reply-To: <AD4FF975-B9C1-43C2-8214-07665ECDBA52@gmail.com>
X-Original-Sender: antoshkka@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=WTggP5jc;       spf=pass
 (google.com: domain of antoshkka@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=antoshkka@gmail.com;       dmarc=pass (p=NONE
 sp=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-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:36411
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36411>

--f403045e9f503551d0056161f054
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

2017-12-27 1:33 GMT+03:00 David Krauss <potswa@gmail.com>:

> Hi Antony,
>
> This looks more like lifetime extension than copy elision. If the copy is
> elided, then the complete object cannot be destroyed until the subobject
> is. Quickly scanning through your =E2=80=9Cultimate=E2=80=9D paper, I don=
=E2=80=99t see this issue
> mentioned.
>
> Since C++98 we already have a rule for lifetime extension when using a
> return value subobject to initialize a scoped reference. So, does this
> feature not already exist with the syntax of declaring a reference? Also,
> the behavior is required, not optional.
>

That's different. The paper is mostly about removing copy/move+destructor
from the assembly or intermediate-representation. This does not extend the
lifetime of the objects as you see them in C++ code.

--=20
Best regards,
Antony Polukhin

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAKqmYPbnrh-dDTA7HAGuGZkgphtPRr6AYCXtuTUWesEBzbC=
UNQ%40mail.gmail.com.

--f403045e9f503551d0056161f054
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><div class=3D"gmail_quote">=
2017-12-27 1:33 GMT+03:00 David Krauss <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:potswa@gmail.com" target=3D"_blank">potswa@gmail.com</a>&gt;</span>:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex"><div style=3D"overflow-w=
rap: break-word;">Hi Antony,<div><br></div><div>This looks more like lifeti=
me extension than copy elision. If the copy is elided, then the complete ob=
ject cannot be destroyed until the subobject is. Quickly scanning through y=
our =E2=80=9Cultimate=E2=80=9D paper, I don=E2=80=99t see this issue mentio=
ned.</div><div><br></div><div>Since C++98 we already have a rule for lifeti=
me extension when using a return value subobject to initialize a scoped ref=
erence. So, does this feature not already exist with the syntax of declarin=
g a reference? Also, the behavior is required, not optional.<br clear=3D"al=
l"></div></div></blockquote><div><br></div><div>That&#39;s different. The p=
aper is mostly about removing copy/move+destructor from the assembly or int=
ermediate-representation. This does not extend the lifetime of the objects =
as you see them in C++ code.<br></div></div><br>-- <br><div class=3D"gmail_=
signature">Best regards,<br>Antony Polukhin</div>
</div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKqmYPbnrh-dDTA7HAGuGZkgphtPRr6AYCXt=
uTUWesEBzbCUNQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKqmYPbnrh-dDTA7=
HAGuGZkgphtPRr6AYCXtuTUWesEBzbCUNQ%40mail.gmail.com</a>.<br />

--f403045e9f503551d0056161f054--

.
