220 28321 <f8ccbc4e-d67c-4af5-933a-0d2822622baa@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Trivial copyability and `optiona/variant`.
Date: Thu, 22 Sep 2016 12:06:04 -0700 (PDT)
Lines: 60
Approved: news@gmane.org
Message-ID: <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_638_2086017879.1474571164175"
X-Trace: blaine.gmane.org 1474571187 26862 195.159.176.226 (22 Sep 2016 19:06:27 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 22 Sep 2016 19:06:27 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBHOXSC7QKGQEFOHKO3Q@isocpp.org Thu Sep 22 21:06:23 2016
Return-path: <std-proposals+bncBCEKFTV6ZUMBBHOXSC7QKGQEFOHKO3Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f72.google.com ([209.85.214.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBHOXSC7QKGQEFOHKO3Q@isocpp.org>)
	id 1bn9K0-0005Vx-Or
	for gclcip-std-proposals@m.gmane.org; Thu, 22 Sep 2016 21:06:12 +0200
Original-Received: by mail-it0-f72.google.com with SMTP id e20sf220150011itc.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 22 Sep 2016 12:06:14 -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: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=yznkDh0P98mU9qrIV7VxAEtsesy5WKIZJAuuEeCz7MQ=;
        b=zawg/xfM/EiR+hdOQQQhJxKncNHCUw9kSvYSVzdNfvIqh9uXHl/3qVR5Nu0umLiJkR
         52Zn15QPJgkYoL5GjbRktFArNtAsZdQcAxjspMBJTaygbOLEjrYeMxJtlrrExL/Gdkcp
         M4m62NJvXG6IVGVZy9907CceNwAKgyXNIh4jc5pQRMdebZFAyYcPuw54cvGr41p0QzDl
         diIubcLOJZfuo9miTJAy6t5dpQSLz+ujI4nvz0gZ0xmH6/HTMwqGDiJTQJ8JYXj44iu5
         KuGUjAg8MQzHitybUIzuxCKah0oaKhouPJtBERP03/YxnU6iJvDiNU9teLYhhBOku6k0
         d1Jw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id: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=yznkDh0P98mU9qrIV7VxAEtsesy5WKIZJAuuEeCz7MQ=;
        b=VTkQhFRCiuip1pnRZ5VMuPiPOD9U2pzt5sca378QFeBTJbWs2VwS9v4/X5JosaB+nk
         UsRtzNfKUglgULu5Pnoy59hBQ7pqTZPf9SS0W/a1spd7raVFiPUGrHKbIgQlzYHWZyo9
         J6D1Sv88pFRDFzQhVUjJixlSiChMEKhTD6MZgze8KaRYVnxZzlEevN78wtiQtudzmXpG
         lAI9rmWcGIbX+iS/4QARkPi4rkK+/25d1otwDWYfqCcoi1kkcbNTC2iaMGp/Kye77+iv
         0hKKSunNW9qaK94CiqVwmhvCX1CSVHkJFQb0J4r7cLpyUNCr2zflRTl1GlT1ke+LhnH6
         mWOQ==
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: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=yznkDh0P98mU9qrIV7VxAEtsesy5WKIZJAuuEeCz7MQ=;
        b=lAakzlZUg14fju1qYGNLT48fhcBvINo8Gs8aSlNuYJyT30lge4qzjGTjvbXnzogLUq
         RDDSeBd7Yo8TXTa4yCXBW3blkrZEVTjyszh/chA5uZOHWKPTpZNKuRO6iVJii2IMkn5/
         N+cVWfRKkS+1MCsJy/78jL8vFXx6b9ci4gzveasUwH3kPLqXFFQeISOvPCXaADNNc949
         bPiwqqKmMuIWFPrxC91PBbgdskM2K4swUdDkDdGHvfaQqPwrtwXtTh/CJWLWiDVvqY4f
         U2I+Drk22mjrJrrRwWyOxxg2Zn5emF33X2YN2zORiqR+K1peRhGrcemkp6dHPs24wSl1
         mdDg==
X-Gm-Message-State: AE9vXwMWcOAcdJlKaREYnniVfqY4CX32sZNUycDCqHg4rTCF24poxIrmLc6rfqc+cM2jbg==
X-Received: by 10.36.250.67 with SMTP id v64mr622624ith.37.1474571174230;
        Thu, 22 Sep 2016 12:06:14 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.11.86 with SMTP id v83ls3708202ioi.3.gmail; Thu, 22 Sep
 2016 12:06:05 -0700 (PDT)
X-Received: by 10.36.39.214 with SMTP id g205mr254556ita.7.1474571165147;
        Thu, 22 Sep 2016 12:06:05 -0700 (PDT)
X-Original-Sender: jmckesson@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:28321
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28321>

------=_Part_638_2086017879.1474571164175
Content-Type: multipart/alternative; 
	boundary="----=_Part_639_1398756088.1474571164175"

------=_Part_639_1398756088.1474571164175
Content-Type: text/plain; charset=UTF-8

`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?

-- 
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/f8ccbc4e-d67c-4af5-933a-0d2822622baa%40isocpp.org.

------=_Part_639_1398756088.1474571164175
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">`optional` is not required to be trivially copyable if `T`=
 is trivially copyable. And yet, I cannot imagine an implementation of `opt=
ional` where that is not at least <i>possible</i>. After all, the bit sayin=
g whether the `optional` is empty is likely a basic type. So why should tri=
vial 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 varia=
nt itself trivially 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>

<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/f8ccbc4e-d67c-4af5-933a-0d2822622baa%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f8ccbc4e-d67c-4af5-933a-0d2822622baa=
%40isocpp.org</a>.<br />

------=_Part_639_1398756088.1474571164175--

------=_Part_638_2086017879.1474571164175--

.
