220 28322 <47c7c8cf-13f4-4026-acf4-41ca1d2a3e53@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Casey Carter <cartec69@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Trivial copyability and `optiona/variant`.
Date: Thu, 22 Sep 2016 14:46:27 -0700 (PDT)
Lines: 75
Approved: news@gmane.org
Message-ID: <47c7c8cf-13f4-4026-acf4-41ca1d2a3e53@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_1922_579463712.1474580787221"
X-Trace: blaine.gmane.org 1474580808 9948 195.159.176.226 (22 Sep 2016 21:46:48 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 22 Sep 2016 21:46:48 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBD2MLWWVRQMRBNFCSG7QKGQE75A2DQQ@isocpp.org Thu Sep 22 23:46:43 2016
Return-path: <std-proposals+bncBD2MLWWVRQMRBNFCSG7QKGQE75A2DQQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f198.google.com ([209.85.161.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD2MLWWVRQMRBNFCSG7QKGQE75A2DQQ@isocpp.org>)
	id 1bnBpC-000104-5f
	for gclcip-std-proposals@m.gmane.org; Thu, 22 Sep 2016 23:46:34 +0200
Original-Received: by mail-yw0-f198.google.com with SMTP id t67sf194526862ywg.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 22 Sep 2016 14:46:36 -0700 (PDT)
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
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=9robBnzHgK2drfRAadgTl4p2+e060RM1ShgIr4wTXEk=;
        b=labjFjzxoe6a/d7KXPFJkI+xfRKmXlWNvt3fSEsekr32/Q0ywC2P+qpcDmFvqgxKDY
         h26Pcv6UUP3OOUZLjxbPLhZHVET42DOoSLEcSeSulo4FppWtzX//lj8uzg971nGpNvFJ
         GugSRcLR009MgLGYSfoKfS6hs0XiJwtqrBsyZHW5wlfuOSIxmZEQihnOWnKp5rs4YzHd
         9wZsdezvJ9cgSbB1zPPmBjHrCxv0BLiaCxdoKQOW1VMec9tblqe3FTm46WjixcTgoRBj
         pNSWq/ByM7uBOOXoki7AO0wNpaSChmuxtypgWscar0P0eWMrMViDaP0MnEDjNBWknFQp
         SrHg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=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=9robBnzHgK2drfRAadgTl4p2+e060RM1ShgIr4wTXEk=;
        b=Ltg8o6hIdAr5s3HuTGF5ZMAHOGzyCatwpXbBJ5+VP36pc4yooJz6DS2cap+cez/4B4
         HRlWsDXFVoiRWxRZYsTcIumuDa0v4Sh9UWesBjjSeKt+s/3+m99+m4LwIIgc6ZaVBFHM
         O+jYPEP5Ss7bnbGxcVWlLJPVS5snEzXPFzUxgA54rBZX4Vm4AOhKlT6XcDp1EsZaTlWD
         N/oLNWR+bdInBi5/9pBMj4OlwRxS8muY7Ag127nZKzV443ZspMgAZvfzbnnfLnEbJqfd
         DSNTIQU/2GGhDBuRFZU40RlWRZ+79ajiKgk1YRfWo+MOOsXrtk5T4Wfztc2zHXQp5MM7
         4OAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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=9robBnzHgK2drfRAadgTl4p2+e060RM1ShgIr4wTXEk=;
        b=XiLETiu/0UVirCskvSaCfggCGzRowVg/yCWBr11wKd60i3cN3cAhTM7ktU2Zjyn1Xp
         sEYtv92jSaPkGDff/eyL7RgBBdEYtQA2gsPgbPD8jFrgFIoRS3nHDTmmkr4pJn1JJxvc
         wrePFhvdbXhtMnY4mLdcmGeUSqeoejHPx+fgMnEAmVeB3md+fOWfP0yfAR9wl2c1HXjG
         k7eeiKJWBfFEDyAq3e98ltRtDaNmKO00kMoOe0no0mz+526ZXJ8mRM8GiIj7dpEQKFDi
         WyIFbijG3nybSvsfiTwY8YHX7UAiPkcdGkl+1Vx/olU5YuhREyI6vLjiqo60foLr+7g3
         gfww==
X-Gm-Message-State: AE9vXwPh+f21eN7d1rYeO1Hjbv6hJxzYmSG4UPg3GvrxA/9IISA9FlBJEzJwvfbbZDGnBg==
X-Received: by 10.129.123.197 with SMTP id w188mr871106ywc.111.1474580794447;
        Thu, 22 Sep 2016 14:46:34 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.37.1 with SMTP id l1ls6056693iol.16.gmail; Thu, 22 Sep
 2016 14:46:27 -0700 (PDT)
X-Received: by 10.36.60.150 with SMTP id m144mr311150ita.1.1474580787805;
        Thu, 22 Sep 2016 14:46:27 -0700 (PDT)
In-Reply-To: <f8ccbc4e-d67c-4af5-933a-0d2822622baa@isocpp.org>
X-Original-Sender: cartec69@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: <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:28322
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28322>

------=_Part_1922_579463712.1474580787221
Content-Type: multipart/alternative; 
	boundary="----=_Part_1923_1175359735.1474580787221"

------=_Part_1923_1175359735.1474580787221
Content-Type: text/plain; charset=UTF-8

On Thursday, September 22, 2016 at 12:06:04 PM UTC-7, Nicol Bolas wrote:
>
> `optional` is not required to be trivially copyable if `T` is trivially 
> copyable. And yet, I cannot imagine an implementation of `optional` where 
> that is not at least *possible*. After all, the bit saying whether the 
> `optional` is empty is likely a basic type. So why should trivial 
> copyability not be possible?
>
> Similarly, if all of the `Ts` for a `variant` are trivially copyable, it 
> should be possible to make the variant itself trivially copyable.
>
> Is there an implementation problem I'm not aware of, or was this an 
> oversight? Should a national body comment be filed or a defect report be 
> sent?
>

Those requirements are implementable: the Microsoft implementations of 
optional and variant maintain trivial copyability of the contained types. 
It seems to be QoI to me; I see no strong motivation to *require* that 
behavior.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/47c7c8cf-13f4-4026-acf4-41ca1d2a3e53%40isocpp.org.

------=_Part_1923_1175359735.1474580787221
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, September 22, 2016 at 12:06:04 PM UTC-7, Nico=
l Bolas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
>`optional` is not required to be trivially copyable if `T` is trivially co=
pyable. And yet, I cannot imagine an implementation of `optional` where tha=
t is not at least <i>possible</i>. After all, the bit saying whether the `o=
ptional` is empty is likely a basic type. So why should trivial copyability=
 not be possible?<br><br>Similarly, if all of the `Ts` for a `variant` are =
trivially copyable, it should be possible to make the variant itself trivia=
lly copyable.<br><br>Is there an implementation problem I&#39;m not aware o=
f, or was this an oversight? Should a national body comment be filed or a d=
efect report be sent?<br></div></blockquote><div><br></div><div>Those requi=
rements are implementable: the Microsoft implementations of optional and va=
riant maintain trivial copyability of the contained types. It seems to be Q=
oI to me; I see no strong motivation to *require* that behavior.</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/47c7c8cf-13f4-4026-acf4-41ca1d2a3e53%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/47c7c8cf-13f4-4026-acf4-41ca1d2a3e53=
%40isocpp.org</a>.<br />

------=_Part_1923_1175359735.1474580787221--

------=_Part_1922_579463712.1474580787221--

.
