220 37481 <CAHSYqdba84TLvQ8HRCcae-nCQ-5Skyj+i5RA7Z1wfTwcC4u2bQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Hyman Rosen <hyman.rosen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Allowing std::complex's magic permission for
 other types
Date: Mon, 26 Mar 2018 18:13:06 -0400
Lines: 66
Approved: news@gmane.org
Message-ID: <CAHSYqdba84TLvQ8HRCcae-nCQ-5Skyj+i5RA7Z1wfTwcC4u2bQ@mail.gmail.com>
References: <a3462649-a7bd-4215-b162-e8fe922df02d@isocpp.org> <6ec944b3-16c3-4f00-b0c9-a449a522d4ac@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a114b332c4e46fc05685815bf"
X-Trace: blaine.gmane.org 1522102290 5866 195.159.176.226 (26 Mar 2018 22:11:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 26 Mar 2018 22:11:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKJJPVBQMKRBCHB4XKQKGQEFL6QQTQ@isocpp.org Tue Mar 27 00:11:26 2018
Return-path: <std-proposals+bncBDKJJPVBQMKRBCHB4XKQKGQEFL6QQTQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f199.google.com ([209.85.128.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDKJJPVBQMKRBCHB4XKQKGQEFL6QQTQ@isocpp.org>)
	id 1f0aKn-0001Qn-Dx
	for gclcip-std-proposals@m.gmane.org; Tue, 27 Mar 2018 00:11:21 +0200
Original-Received: by mail-wr0-f199.google.com with SMTP id w10sf10869878wrg.15
        for <gclcip-std-proposals@m.gmane.org>; Mon, 26 Mar 2018 15:13:29 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1522102409; cv=pass;
        d=google.com; s=arc-20160816;
        b=FYBRAomneUavmSZ4bri7oyvaxK4cMDOizQZMlDnr24GO1Bngz7D6aiw7Zj9aOlzXac
         gFK+bPe7i+Q98zoUmQ0Jow79KM+qYG2EjDcRjcnL5Sfwh7fg7paEBMTb1JQZgp1hpMO+
         Bcpzn8Z+S/M+AAP6n4JTgPtV59oDaW4A+jk6iZ2zNsl+EQef5FJ8ygetwQZlD3fodeEn
         DORPNuJR9Q8uEvYh8HaLHQ+5tSv+wvt4ikVSW4q+amvs8AGKzXcP4ATNirvbTFWt1Pn3
         skaPIyo15fI3Wed1Mb12F2LbbmQ9QoM26wL9rvzuhJRd3AWiEREQMVRceYYwX1srhD1W
         PJTw==
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=2rQaLO6d2hixww09+ENQApyvAWaoeQ4WEznUf2IOYhw=;
        b=VxKoe5xYTiH7Bmq7jvrP/n/T5YFf7YzDjuNlOrIxKH8Yo2XhCbi6D36wW8Ch/I5QB8
         M4R+gC7rLZUX1QyO82SjrEsiJqYPgqvYVLd7VEDwObSjXl4db8/+Cpd2iAQm8/iBxL5H
         ICccPuKSxWGCc9re2HzEx0o/syQdrkVvHcZAaiY/X4NR+m/ivN7QXwbWJg0vAps2NJH2
         J3sZF6bveu/i4fcgVhVrpeQvwjBbQQ+OGvoY0fX4TWvgJInq2VdeVUia+dPELT6ZnRW3
         DrrdiwDSQGx/9No9fUwCoknIYUpudqhMPQ79Pezgx1w8aAZR6p2bRc13cS/+DXqWn7k3
         pnAw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=QMbta4az;
       spf=pass (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hyman.rosen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE 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=2rQaLO6d2hixww09+ENQApyvAWaoeQ4WEznUf2IOYhw=;
        b=q2tOFVvy/2ao7csS6KZ8yNjP4MROmIqn+HCcpXy621CA+4s753MH7K6eDZN9EH6gVW
         2/RVkzYdl1FpG5+/3Qj807EvYDcUWd+E3gQ7fSFm+xVc/F8cbo7BlwHIThd3z1szkDIX
         o7g63HVJbZHkSGAYwZd7qvyfyBZqAZvNqBBwamn1CzruOqY+1w/3cFFF0/+n9hFt7u5v
         g5g8dKZhHMVPoAtySHXNuM4pWsabC1hlVRguE9/XFYz33Cc5+dRUd/zADVBChbn6K/hS
         EnIlS0+ot1FoHR7d/G9MwTPsxCBYZoQiQiZ8wm0JaVx7CSvCXtNIAVWkJ5XNo43fMdGU
         tG0w==
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=2rQaLO6d2hixww09+ENQApyvAWaoeQ4WEznUf2IOYhw=;
        b=l19BRlsVOQ7YFYqrr+KeHYi7RkJKEeQ5zg/+erQblygMwZBy1xD4GVsDlxH5KQX0k/
         xAadiylDBVbUlxVD9CQGkGm2BEJp8ngqQu+WYHqlS+SNFMskoZW8kWRO+L+D0GmvJoYm
         6sLr+G4MsgLnjvqYTeRXfINSpaiaxwYyi1/K14DOTMDoGsUWCDDGgjqyxXmjsFpx9fEP
         eVZdZKvKTkkj9AAAzz+1vEMdtPZLDjuB63pEv6FfNF9aKDDkn3/lNYLBuGCTNEmhzNEk
         WXkxo9CSIfm7wwZTfp7YUQoaxlTU5gbfNwGJ/trmazFhnqJjLJf8SZkb2gULP5NaBqjp
         eBcA==
X-Gm-Message-State: AElRT7E3MRFV+9h3RzPafma3BQD7CJqOAmvF4sfVv27CWJ3SayNqhmJa
	ylry1M/PQW2DWEwXqKY2YC5ukg==
X-Google-Smtp-Source: AG47ELuRUyrR9aH/Y7LhFrIVR+qMk1BL76rM/mJkSnSmcg5NLI0v9QxV9CzLKFEigLAsJGEonfSX8A==
X-Received: by 10.28.237.15 with SMTP id l15mr2339752wmh.1.1522102409050;
        Mon, 26 Mar 2018 15:13:29 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.223.134.106 with SMTP id 39ls4488900wrw.7.gmail; Mon, 26 Mar
 2018 15:13:27 -0700 (PDT)
X-Received: by 10.223.181.149 with SMTP id c21mr18975818wre.233.1522102407959;
        Mon, 26 Mar 2018 15:13:27 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1522102407; cv=none;
        d=google.com; s=arc-20160816;
        b=x9mIigXMp0dHrl55L96RMPAtGQfLEIx7jgM3eWmxaPE26Jnvt7XWVgqB0eVHYmj4kk
         0xOm4i9dIgnlOqX0/mh6akjdD53F7nxiLl335Xg7m1oQcIlXsHGCp2mOY2tENzxHc43F
         FR1RfHnoilvyqItWHzckPGvtSVYaPIIG7ry5ZPIQz3Cs2JUXbTLzeXskTQkVjiV4DsiY
         ddQ0W+1KQ4UpFGyiC5wfjhE/00T9LKoj+tSn6Ik8vrSqNIr1e7o9LX8Qu4l2nVMrpMTD
         uEJkMH1ioqbqqXHcKWiItKHHALvMqXXs3y6tbRGWei7yf8Ydh1jKjoz3191oqW8QQNSg
         96qg==
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=vPD+uhTBNEzxH+EpUbxjFtLMparPS8x1nxMZocsD7fQ=;
        b=XJ5/ZKVkGN+uoMRYhteYURL8v6Zhte5ezOzHI3tUADPZp2gR38AVlPsN9+VMvV2nc0
         t8Mx/vfQlSzf5+VHszBKuIWaLnIr6wI663hbKbft0IM/mSGan7yCZpzIyzmyQRUf6FLQ
         qvUrIqgecY4oKXD+Fe6Y7JW/1POW8zvXnboTjoVg1RuC3KvIrk4ah+6XvfZNzecTGChj
         omw4CiAc3rMUJsnv7BnNxituTrxPp7430L6ZVfQM2sGZDxqjj9YNYpeB4ZdPYK47j495
         bz8cS/0xZJzxT6tpVCg9BrBpxLiMSwUAsv/n4vL4YdiTJQeyhU9k25Dxqhq/5Vp+9qnD
         wohw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=QMbta4az;
       spf=pass (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hyman.rosen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE 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 f14sor10701wmi.51.2018.03.26.15.13.27
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Mon, 26 Mar 2018 15:13:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.28.101.6 with SMTP id z6mr15178141wmb.110.1522102407413;
 Mon, 26 Mar 2018 15:13:27 -0700 (PDT)
Original-Received: by 10.28.55.19 with HTTP; Mon, 26 Mar 2018 15:13:06 -0700 (PDT)
In-Reply-To: <6ec944b3-16c3-4f00-b0c9-a449a522d4ac@isocpp.org>
X-Original-Sender: hyman.rosen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=QMbta4az;       spf=pass
 (google.com: domain of hyman.rosen@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=hyman.rosen@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE 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:37481
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37481>

--001a114b332c4e46fc05685815bf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 26, 2018 at 4:39 PM, Nicol Bolas <jmckesson@gmail.com> wrote:
>
> What isn't OK is the pointer arithmetic that follows, or the assumption
> that there is no padding between the elements.
>

[class.mem] says
[ *Note:* There might therefore be unnamed padding within a standard-layout
struct object, but not at its beginning, as necessary to achieve
appropriate alignment. *=E2=80=94end note* ]

Granted that notes are non-normative, the assumption that padding is
present only to achieve appropriate alignment allows for reasoning about
pointer arithmetic between class members.

--=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/CAHSYqdba84TLvQ8HRCcae-nCQ-5Skyj%2Bi5RA7Z1wfTwcC=
4u2bQ%40mail.gmail.com.

--001a114b332c4e46fc05685815bf
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 M=
on, Mar 26, 2018 at 4:39 PM, Nicol Bolas <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:jmckesson@gmail.com" target=3D"_blank">jmckesson@gmail.com</a>&gt;</s=
pan> wrote:<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 dir=3D"lt=
r"><div>What isn&#39;t OK is the pointer arithmetic that follows, or the as=
sumption that there is no padding between the elements.</div></div></blockq=
uote><div><br>[class.mem] says<br><div>[ <i>Note:</i> There might therefore=
 be unnamed padding within a standard-layout struct object, but not at its =
beginning, as necessary to achieve appropriate alignment. <i>=E2=80=94end n=
ote</i> ]</div><div><br>Granted that notes are non-normative, the assumptio=
n that padding is present only to achieve appropriate alignment allows for =
reasoning about pointer arithmetic between class members.</div></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/CAHSYqdba84TLvQ8HRCcae-nCQ-5Skyj%2Bi5=
RA7Z1wfTwcC4u2bQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdba84TLvQ=
8HRCcae-nCQ-5Skyj%2Bi5RA7Z1wfTwcC4u2bQ%40mail.gmail.com</a>.<br />

--001a114b332c4e46fc05685815bf--

.
