220 35023 <CAJnLdObZx2pvq2_Qk3M0kryekh=1zsMB=oP6vTYn8s+i8BtaeQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Edward Catmur' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: standard attribute for unions to pun types?
Date: Thu, 19 Oct 2017 22:11:34 +0100
Lines: 76
Approved: news@gmane.org
Message-ID: <CAJnLdObZx2pvq2_Qk3M0kryekh=1zsMB=oP6vTYn8s+i8BtaeQ@mail.gmail.com>
References: <68af543f-b30b-447b-8709-56ccd847735a@isocpp.org>
 <5df63738-279b-44ae-be59-6e729577000d@isocpp.org> <CAJnLdOZ++Dd7pcxkzh+mbP9Ri+4LrhA9EQvX1fzvh3fTOCsFhw@mail.gmail.com>
 <9f16bfc4-8b7b-4108-bff9-1d0c2147edd6@isocpp.org> <CAJnLdOZTu_cPz6qNY519OajAyvLN1+Xo4-eVA_1E_en2W1t54g@mail.gmail.com>
 <81a9a9de-9fc7-480c-8cd2-263e2c4fae7d@isocpp.org> <CAJnLdOaiYo9b791yyGcRoBhfoK1Nm+LP-ZgphDGO7Wxx1rOg6A@mail.gmail.com>
 <CAHSYqdZ6NUV5ypE-0AOfnJPoDxzq_4HNXVz0AWGAk6SaLNfn7w@mail.gmail.com>
 <20171019152630.GA44508@mjolnir.local> <CAJnLdOYXOGMFUNsiRAzB1+dZi2+Gb4OJ5saLFe0L0jUF3qKc3Q@mail.gmail.com>
 <CAHSYqdZPE+k+BhxzbYd-sxu=K6svAYCwNPiN9J=6GtyqoBNKLw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a114696ba226e66055beccde2"
X-Trace: blaine.gmane.org 1508447512 20976 195.159.176.226 (19 Oct 2017 21:11:52 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 19 Oct 2017 21:11:52 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDZLZTXF7UJBBCFKUTHQKGQEDL7PZHY@isocpp.org Thu Oct 19 23:11:48 2017
Return-path: <std-proposals+bncBDZLZTXF7UJBBCFKUTHQKGQEDL7PZHY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f198.google.com ([209.85.128.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDZLZTXF7UJBBCFKUTHQKGQEDL7PZHY@isocpp.org>)
	id 1e5I6D-0002SW-9s
	for gclcip-std-proposals@m.gmane.org; Thu, 19 Oct 2017 23:11:29 +0200
Original-Received: by mail-wr0-f198.google.com with SMTP id v105sf1129571wrc.11
        for <gclcip-std-proposals@m.gmane.org>; Thu, 19 Oct 2017 14:11:37 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1508447496; cv=pass;
        d=google.com; s=arc-20160816;
        b=mMLBMMbGxxkhT469rxaSynfnSK//DLLZwqZ1mUXUz2Jb68kMDq/ntv58WfURW2ctYn
         O6difOA0KJQJYZUdFkipTNRa3DZn9xwd3lz9HVrNkifEN9pHNI6DI+1VGWeO26mduDF3
         hT1VFxnqySpVvafIrdWctGgFzsWJop7U+yENTiRKoKeM9oUcFUF/tIZNUQKk9OL8ODko
         UzuiVBiL5JSPTLGsuom+mVhaMxdvUSG6ihxJpd2lFURpVvtyDZm2l+gd5+K2Mjag4nSp
         sbVVnCRdZQ/o0qz+GTl+eI3J/EFGQ37WDr4gzV7WzQyZWRS4JzrSS67MkzoRfI7d40ZH
         uh1w==
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=7RyNl6PwkHtP/CtmsFJ0Q9TjYcj0T5oqZhcRtzaEUrM=;
        b=rqT5AjmSu13ssRMxF5QZdEzZiNhPMvZXnxMP3EhioZ9LGkJXHzNF50J04zlnaelJDY
         nXp5z9iZfp5lX0Y76YxxPCUIrSS0obW11IxGTyyt3QiS2uzgjUPru8gu/cVbOhAknEPT
         H+M7GInsI0QqIwg45eagZBR1diKrBhBOJP8eJgq9yDwEeJoEFf+geKd3q15n+N6/K0V+
         VH7XNSe1bn1O70if2LAdqe+r44HZFJE1MHnZqCsVDdlyAa26qCHgtydH/Z1CKnbtwKNf
         6/m/2vN7JLMfCb5sPPze1IwgWOEs/EhCnQrNn5RdKWacfCEWcJ3qKnVgMvRXOYndgtr1
         qQ6A==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@googlemail.com header.s=20161025 header.b=kofHBo1J;
       spf=pass (google.com: domain of ecatmur@googlemail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ecatmur@googlemail.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.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=7RyNl6PwkHtP/CtmsFJ0Q9TjYcj0T5oqZhcRtzaEUrM=;
        b=BDV4bAqYSzS9OTnDfbdq9/ENieTCmFZ3xI02n+UbHVQSHpvdpDKE+K8GGcdg9Ix+dl
         6xiNZ3G2FI4P547GHIwww6m7SH74faroDntqhwuGqVG4xXK1IQbvU/B51j2SRe23/4vq
         m27aj+/udjWs2wbrXfrD93wV80ZUffFom9B+F70+Gxo0DSwsG32N+S+6L3Sjs6f/lYoF
         +HWd7VEcUW3kmVJA8RuoG/acb0Y3ImhYUAwoZsFBkMnu7GmoifmEbjSpX8CcS71813St
         og8bFhemzFuz4J9I0djxmBZ4fTpL/9I54WYhbvtrTVAj6dQmGsxn3CnU/QHpkVvTzw8X
         D1TA==
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=7RyNl6PwkHtP/CtmsFJ0Q9TjYcj0T5oqZhcRtzaEUrM=;
        b=Er1B07A+k+O7hvypb0HtIoHd360lU6myvGd8RhkibMZv6gsiiybpB+bvLBLHDVHw1X
         FWLNIhTOapJMNrgKp1R4AJs5/tt8GOkOhuXZdm8tHGvxnd/Cpm6jZCddwGozg9cHgD+j
         a47KtLMs1N26g7dSYaSMrEEe2se+tEKxA7vsSghokSPRUdBCAZvtixrMLRlzR2Gy6qHC
         Y48r4ELlfvTk7CohP3z7BmZImcjcbEgwUb9pKSYcQSEwWTPPPi5ua0R8FYaOtrpwlnet
         f7pai9dCgvqNorFIegW8JTFoLuUWFx8TTnd8jMbk0yydc/+BWnpMpOl0BiyWBANdEH/O
         CWfA==
X-Gm-Message-State: AMCzsaVsaGseyOGtnZdhhIofxgA3up6wtlja62otobZBhLK+Yezl71wk
	72P4sUlVy48CBLOkUIeoelo=
X-Google-Smtp-Source: ABhQp+RlKET5CLPtX1nJhL6/PeVHxEuWKGFjNDWJxMAADTwqWzIva5HTe9qpDjJFIIO5j3aJjJNgVg==
X-Received: by 10.28.31.148 with SMTP id f142mr353001wmf.4.1508447496825;
        Thu, 19 Oct 2017 14:11:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.223.168.99 with SMTP id l90ls2235543wrc.14.gmail; Thu, 19 Oct
 2017 14:11:35 -0700 (PDT)
X-Received: by 10.28.63.68 with SMTP id m65mr2450967wma.55.1508447495927;
        Thu, 19 Oct 2017 14:11:35 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1508447495; cv=none;
        d=google.com; s=arc-20160816;
        b=uwr58IWMH+0x55TOv+F12QTtwAW+8P5JTmN1MAuwq8GMvoHmFYbddvmCs97pc7S/ct
         k6hra1M9f6JMtXNsIOQ9ANZPFJVxRcPc5o1sef0JXFbRPNv9c192VTEHV+vC9WJLWqYZ
         GP4XmYiFLtZunyC3pwz8CO7B2vd3d/QRro7hW3e0YeDRydFJg62G0EKsuD++X2e0iZim
         PSzWkIWxE3h9zkPJz3f75doN0n3z8vEwMsPv5SYTaGdIURJ85iDxyrgr2ie2Arpd9ooA
         cgtTr5tLRDQOSuJYuz3Pl0t7+u4wTlDxl3dUAgGbZ0wSVLFrqJtgaRBJekGCw8dTxbks
         DXMQ==
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=MhVWoV0qqxhL3MCFXC/kqzIolhbTO7REsh9e6brY+x0=;
        b=0DvK8iWVVQiDYG1qJq9I2NRWB4ryp+9KVRyTNbopSLVjIhf9YEyB/PCYpuAzaw5CnU
         rtZOPGAytFpxAQC0i7KGLJCqN5yF9IVlOoFkjnAFo6cRI1iefcvN+Fd/iL7bONJKM1CE
         oZflHCKVJlGkIMTzTC2vCCdRqxlx//07KhT+Tg48GHOFPP47IhG98s46eVz0GuDAC2V0
         qIzVS0EbiHULnn03U/0GtDV9VaAA8bq90Ce9v+UdmwNjqv08431hAumKK2PJTD4K0OyN
         eGDcKI9DCKAro1sB+tj3l/Pf48K6utbFv4aYowcWtqwjLeF8Y+SYinRDfHYfkcvV2gSY
         r4Xw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@googlemail.com header.s=20161025 header.b=kofHBo1J;
       spf=pass (google.com: domain of ecatmur@googlemail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ecatmur@googlemail.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.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 y66sor621126wmd.66.2017.10.19.14.11.35
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Thu, 19 Oct 2017 14:11:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of ecatmur@googlemail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.28.143.130 with SMTP id r124mr2897364wmd.122.1508447495546;
 Thu, 19 Oct 2017 14:11:35 -0700 (PDT)
Original-Received: by 10.28.52.145 with HTTP; Thu, 19 Oct 2017 14:11:34 -0700 (PDT)
In-Reply-To: <CAHSYqdZPE+k+BhxzbYd-sxu=K6svAYCwNPiN9J=6GtyqoBNKLw@mail.gmail.com>
X-Original-Sender: ecatmur@googlemail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@googlemail.com header.s=20161025 header.b=kofHBo1J;       spf=pass
 (google.com: domain of ecatmur@googlemail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=ecatmur@googlemail.com;       dmarc=pass
 (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com
X-Original-From: Edward Catmur <ecatmur@googlemail.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:35023
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35023>

--001a114696ba226e66055beccde2
Content-Type: text/plain; charset="UTF-8"

On Thu, Oct 19, 2017 at 9:06 PM, Hyman Rosen <hyman.rosen@gmail.com> wrote:

> On Thu, Oct 19, 2017 at 12:34 PM, 'Edward Catmur' via ISO C++ Standard -
> Future Proposals <std-proposals@isocpp.org> wrote:
>>
>> Are you aware of the bit_cast proposal? https://wg21.link/p0476
>>
>
> Can bit_cast return a reference to the From object reinterpreted as the To
> object,
> or is it strictly copied return value only?  If the latter, it's just more
> optimizationists
> papering over what people really want to do.
>

References are not TriviallyCopyable, so the answer is no.

I am sure that plenty of "what people really want to do" would be satisfied
by bit_cast as presented. For example, the dtoa you mention above could
readily be implemented in terms of a value-semantic bit_cast.

-- 
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/CAJnLdObZx2pvq2_Qk3M0kryekh%3D1zsMB%3DoP6vTYn8s%2Bi8BtaeQ%40mail.gmail.com.

--001a114696ba226e66055beccde2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
hu, Oct 19, 2017 at 9:06 PM, Hyman Rosen <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:hyman.rosen@gmail.com" target=3D"_blank">hyman.rosen@gmail.com</a>&gt=
;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div cla=
ss=3D"gmail_extra"><div class=3D"gmail_quote"><span class=3D"">On Thu, Oct =
19, 2017 at 12:34 PM, &#39;Edward Catmur&#39; via ISO C++ Standard - Future=
 Proposals <span dir=3D"ltr">&lt;<a href=3D"mailto:std-proposals@isocpp.org=
" target=3D"_blank">std-proposals@isocpp.org</a>&gt;</span> wrote:<blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra"><div clas=
s=3D"gmail_quote"><div>Are you aware of the bit_cast proposal?=C2=A0<a href=
=3D"https://wg21.link/p0476" target=3D"_blank">https://wg21.link/p0<wbr>476=
</a>=C2=A0</div></div></div></div></blockquote><div><br></div></span><div>C=
an bit_cast return a reference to the From object reinterpreted as the To o=
bject,<br>or is it strictly copied return value only?=C2=A0 If the latter, =
it&#39;s just more optimizationists<br>papering over what people really wan=
t to do.</div></div></div></div></blockquote><div><br></div><div>References=
 are not TriviallyCopyable, so the answer is no.</div><div><br></div><div>I=
 am sure that plenty of &quot;what people really want to do&quot; would be =
satisfied by bit_cast as presented. For example, the dtoa you mention above=
 could readily be implemented in terms of a value-semantic bit_cast.</div><=
/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/CAJnLdObZx2pvq2_Qk3M0kryekh%3D1zsMB%3=
DoP6vTYn8s%2Bi8BtaeQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJnLdObZx2=
pvq2_Qk3M0kryekh%3D1zsMB%3DoP6vTYn8s%2Bi8BtaeQ%40mail.gmail.com</a>.<br />

--001a114696ba226e66055beccde2--

.
