220 36273 <390b06f2-0c86-465e-9a11-d0ebb3501970@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Andrey Davydov <andrey.a.davydov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Trivial copyability and `optiona/variant`.
Date: Sat, 23 Dec 2017 04:17:01 -0800 (PST)
Lines: 87
Approved: news@gmane.org
Message-ID: <390b06f2-0c86-465e-9a11-d0ebb3501970@isocpp.org>
References: <f8ccbc4e-d67c-4af5-933a-0d2822622baa@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_10310_825460880.1514031421274"
X-Trace: blaine.gmane.org 1514031307 15908 195.159.176.226 (23 Dec 2017 12:15:07 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 23 Dec 2017 12:15:07 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC7OLSNDXIHBBPUS7HIQKGQETJRZJCY@isocpp.org Sat Dec 23 13:15:03 2017
Return-path: <std-proposals+bncBC7OLSNDXIHBBPUS7HIQKGQETJRZJCY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f70.google.com ([209.85.213.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC7OLSNDXIHBBPUS7HIQKGQETJRZJCY@isocpp.org>)
	id 1eSihh-0003fv-CX
	for gclcip-std-proposals@m.gmane.org; Sat, 23 Dec 2017 13:15:01 +0100
Original-Received: by mail-vk0-f70.google.com with SMTP id l14sf3541221vki.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 23 Dec 2017 04:17:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=veeVNNVsIeSoXYr7Dbzpd8mb5V9lCQlTq4rvrNhMMbY=;
        b=sgTOHXkEURBtUdqtFC2vVoJRlVftn/gbkm2bv25NU8jD6UE1Kw00xo8wt24UjsdcIp
         51SIQxFos7TYIfR8g4VnqfEnUWbReP+GuW0n6eTNx99z9yzT0clYmLm2Y/wodk6TyEZx
         gSYn64YpZoJfr0j4psMgLSA/LbeBlraK0xNXtKvp4w7c/pdDYZt2XB6uBLyKuURVral2
         wi74DKqHuIj6BAuRoT97AZywSw8FJPxqVQDMvUNnZeMq3Rpv/+cwuwdIx0y0Y+eq/UeW
         b4m4V49ohiw45q0hTqciKTYqRx/Ih3WJ8Dv6jUGTer9cNibqG8jOho5P8xCppZ7v2S5i
         i8Kg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=veeVNNVsIeSoXYr7Dbzpd8mb5V9lCQlTq4rvrNhMMbY=;
        b=fcvUn6ofDV2vsFcY7lcm2ryxSb50+eqVS13ShICRhUou5KYt63PRDZU4q3mPL1q3e4
         YmUKXf8jOoF/QJhIeBPtJ2VXpjVeWG7B+MyNlRM0T8MtkGCKhpeNeEr1bdJ7trycmYva
         EyQlECJORzy+8KgLcah3s7nllufKmxxA9BJwTIMum+K9trQCYzKwx6inW9DU+zDWLlbP
         ujImFXPXRbyJKujYY76KSK1mbh7vg/zngrO86ctAiaUd0+3g+y8rZc8EnubOuMvuuxOV
         4/UcygjYt4oB90YnhSxSa0buunjtznQHET67gOHlexYIBUZB1dsQ5i3Xj98fTGfTXLR+
         44hg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=veeVNNVsIeSoXYr7Dbzpd8mb5V9lCQlTq4rvrNhMMbY=;
        b=KYQ4WGW376qYKz7hpP8HqY7rLjGUoHic6tvYHIaYY4qnBJktE+uPpDdeW0RdBqqSkO
         CEeEhVS18FI/UvQVO9rAiGCfcwkEeslCeFGYd7cmMqDKGo47lM6i7mHFEJWGM/+jJk2I
         G3X/c1vDW1vWpd2l/qozwLGvGoqNTerraR9Z4ldlsGNOzf1kgipzKFsDDG/o0BpjWhFv
         5mlGgQFoShNpS3S2tVAzJ7mf/WMT6mwyknRXYZAFarUJYTMzlMzJU4PkbK4VP+2O3h0d
         qrFl3fIvCqz8SY3zmGyUTfVOEfcm3v7+cBHBpMOHCGh+y9PVsQ4jQy97G0qWrIhK7CrE
         aPwA==
X-Gm-Message-State: AKGB3mL9f3SFu3jzhxmt+oZUPKf9OQ4rpd+GD5IVUijxuPvZ8nIPrLEu
	Gy9YR8byu0DoZRTFfbM0tdgxZA==
X-Google-Smtp-Source: ACJfBov0t3zezMEhV3Si0jhXllt0AocByFDvCavAM7Cl4niMAQ+Co9exd+Omxjdhj2yRJEqCquppzA==
X-Received: by 10.31.41.205 with SMTP id p196mr7997260vkp.71.1514031423858;
        Sat, 23 Dec 2017 04:17:03 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.176.69.226 with SMTP id u89ls211142uau.0.gmail; Sat, 23 Dec
 2017 04:17:02 -0800 (PST)
X-Received: by 10.31.171.73 with SMTP id u70mr1531536vke.10.1514031421822;
        Sat, 23 Dec 2017 04:17:01 -0800 (PST)
In-Reply-To: <f8ccbc4e-d67c-4af5-933a-0d2822622baa@isocpp.org>
X-Original-Sender: Andrey.A.Davydov@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:36273
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36273>

------=_Part_10310_825460880.1514031421274
Content-Type: multipart/alternative; 
	boundary="----=_Part_10311_920418220.1514031421274"

------=_Part_10311_920418220.1514031421274
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Is there any progress being made on this? As I see now the Microsoft and=20
libc++ implementation maintain trivial copyability, but libstdc++=20
doesn't: https://godbolt.org/g/tL29Hd

=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3, 22 =D1=81=D0=B5=D0=BD=D1=82=D1=
=8F=D0=B1=D1=80=D1=8F 2016 =D0=B3., 22:06:04 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=
=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bolas=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> `optional` is not required to be trivially copyable if `T` is trivially=
=20
> copyable. And yet, I cannot imagine an implementation of `optional` where=
=20
> that is not at least *possible*. After all, the bit saying whether the=20
> `optional` is empty is likely a basic type. So why should trivial=20
> copyability not be possible?
>
> Similarly, if all of the `Ts` for a `variant` are trivially copyable, it=
=20
> should be possible to make the variant itself trivially copyable.
>
> Is there an implementation problem I'm not aware of, or was this an=20
> oversight? Should a national body comment be filed or a defect report be=
=20
> sent?
>

--=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/390b06f2-0c86-465e-9a11-d0ebb3501970%40isocpp.or=
g.

------=_Part_10311_920418220.1514031421274
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Is there any progress being made on this? As I see now the=
 Microsoft and libc++ implementation maintain trivial copyability, but libs=
tdc++ doesn&#39;t:=C2=A0https://godbolt.org/g/tL29Hd<br><br>=D1=87=D0=B5=D1=
=82=D0=B2=D0=B5=D1=80=D0=B3, 22 =D1=81=D0=B5=D0=BD=D1=82=D1=8F=D0=B1=D1=80=
=D1=8F 2016 =D0=B3., 22:06:04 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=
=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=
=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r">`optional` is not required to be trivially copyable if `T` is trivially =
copyable. And yet, I cannot imagine an implementation of `optional` where t=
hat is not at least <i>possible</i>. After all, the bit saying whether the =
`optional` is empty is likely a basic type. So why should trivial copyabili=
ty not be possible?<br><br>Similarly, if all of the `Ts` for a `variant` ar=
e trivially copyable, it should be possible to make the variant itself triv=
ially copyable.<br><br>Is there an implementation problem I&#39;m not aware=
 of, or was this an oversight? Should a national body comment be filed or a=
 defect report be sent?<br></div></blockquote></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/390b06f2-0c86-465e-9a11-d0ebb3501970%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/390b06f2-0c86-465e-9a11-d0ebb3501970=
%40isocpp.org</a>.<br />

------=_Part_10311_920418220.1514031421274--

------=_Part_10310_825460880.1514031421274--

.
