220 37528 <CAA7YVg1Tt-hwYej80qK_Cr2RxvBtP3aM+EZ7gqC4RKz6z9aGPw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Viacheslav Usov <via.usov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Allowing std::complex's magic permission for
 other types
Date: Wed, 28 Mar 2018 16:19:46 +0200
Lines: 59
Approved: news@gmane.org
Message-ID: <CAA7YVg1Tt-hwYej80qK_Cr2RxvBtP3aM+EZ7gqC4RKz6z9aGPw@mail.gmail.com>
References: <a3462649-a7bd-4215-b162-e8fe922df02d@isocpp.org>
 <p9c1k7$h28$1@blaine.gmane.org> <e85dfb30-f3ff-4769-90d2-373efceda1e6@isocpp.org>
 <CAA7YVg2n1N_QrxC09Er4vLr+ebwQ5GhkD-3isND76d4YJHwC0g@mail.gmail.com> <018c02d9-7c65-4451-acc1-c49196fc7622@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="089e08256408018a0f056879b30e"
X-Trace: blaine.gmane.org 1522246666 21889 195.159.176.226 (28 Mar 2018 14:17:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 28 Mar 2018 14:17:46 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDU6VRPKW4BBBBGJ53KQKGQEQJOOAQA@isocpp.org Wed Mar 28 16:17:42 2018
Return-path: <std-proposals+bncBDU6VRPKW4BBBBGJ53KQKGQEQJOOAQA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pg0-f71.google.com ([74.125.83.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDU6VRPKW4BBBBGJ53KQKGQEQJOOAQA@isocpp.org>)
	id 1f1BtV-0005ZJ-UH
	for gclcip-std-proposals@m.gmane.org; Wed, 28 Mar 2018 16:17:42 +0200
Original-Received: by mail-pg0-f71.google.com with SMTP id c16sf1345048pgv.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 28 Mar 2018 07:19:49 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1522246789; cv=pass;
        d=google.com; s=arc-20160816;
        b=FkSaDAZHhurosFy/y2/0K32OwZIFFoJYbTG6J6BWooXDe49rcLI4Eu52BdE65EATLq
         QztgZySPxmU1ZTuHK/iM5aa3Cipn6T0+MrpX7ZAS3o6w4jKpMkMxLdZyvsnk/LizP19B
         jT8thxwIEXT59l/3XY2FbL39A2Vpqe7dgx3x+b9W9Ef5/cvxqnOcZ0jCup4CWWkEpCCL
         +VwgLXfkDeTxWs5AX8G3CYbq5eVVGuJYlxpsaYYYJIlBIEzQaD//0LcR/Jhmuj8zUgjf
         d+Isu4uwAp9aNLJwl8jsU9mvuIdUkNxnvo6bcfbtF7rRE7kfVp7Kc7kQuFy9oP0NAS/V
         H9RA==
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=oNxoaHi0uLD+52hHQnVLe9sRI2y8Pp6d9zuigR3PWBQ=;
        b=RpRBiL1Ij3cGvhys37hKc1Tx+V3NjRaziwtxYAyUBsouNfln/Jva6ns4P8qpNTs/9M
         +nl8Xh3uF9AInjGCQmNJuZeb5X9WuahsArbCoheJ5Yq9NhZSptq9OeN6Y1lE9X2UyPYe
         OCggmHiGTSHeyT7KSpRL1Y+MECh28DC/MFqUqO741A2dsYhg/hXy9ls7xVbcpjSrvFkf
         HjSyti/pycC3ENiAN4/f+5HIw28oYgvF9zE0RuSUXiuehH6F8WEDxTzh5v+kB9Ln1p7h
         kyTjNG19U0blcDYnE9aJXcoRrgrsMpPrls5ekH/bvX2L8ek1mZA72cTHgRsnWeB/HzwI
         Pn+w==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lh+gJ6Mj;
       spf=pass (google.com: domain of via.usov@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=via.usov@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=oNxoaHi0uLD+52hHQnVLe9sRI2y8Pp6d9zuigR3PWBQ=;
        b=P+KfQvAJrnydOAmF7X6tcvhY+e77AoDhNW7Hxa9tIIZ5d/Wu3N+jiIzBE5XRf3AD2w
         oLFd6wvgpRBtIMpd3dE+HxDojFGud15sYWxBSrlGn5/Za9MZHVpxAvdc4tmTXxAgef7O
         NebHLvnjWQY5yNMLFNCGjCzS/Lefen0d2uyxLagRmZAflHL42tBgQOKRMUbd5Y+Jenfw
         dOoCFHEFe30YSoMS6znaki5yMXgUP/Fu8IjUyUKpOvUpQdAmoBIR13kuxYyAVYbhuaxb
         ynWrM1RXpLBSUcKWJVKtld78Onk1wzG5q9xezi6rH1mKR4eMwuHTNYHRRjKTIecI/Ye2
         UuFA==
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=oNxoaHi0uLD+52hHQnVLe9sRI2y8Pp6d9zuigR3PWBQ=;
        b=JH+CukaNvb8CH/jpB6Ua5ToVl5xrw/PHLnhT6Yu3+X/iq9sl6DGY2bSK4aLBb15n8X
         PWIsWsYxlq92B+jPCXpDBzV4cUFYg56njJngqxAjTYnMHG/Svqp4l96mN1hVyN/nsAxZ
         M3dqmzIMpZg8QI8vrFRTm8qUsAd9TgytJY2JNhZtVMQkdDSfciGrTljAyDRo0a5Eb67P
         AXEtDB7rn0pNyH7WMBv1jGtU9em2INMEiktCquyihQGZKGu1vmcLmau92SDXu0IyUa4q
         5Frr+Sc02SKcbH8N56aFiKqyISJMxTN65mQ/Y5ZI2MxQkJBL+ozrIrzm5j01XHNLZe94
         Lacg==
X-Gm-Message-State: AElRT7FbNdoeD8cWPLLxi6BG3++LB5pqtLTNahu/k0Pxalg8gh2KmvD/
	valYjPZstDoQj72YKidPRfb3dw==
X-Google-Smtp-Source: AG47ELt5GkPP7GcaZOyEpDr8tVKVhydJehpWwhxETgzbhq/mXkza4iM4sGx9Mak8wN6zDpYuW36uow==
X-Received: by 10.99.126.87 with SMTP id o23mr13847525pgn.62.1522246789240;
        Wed, 28 Mar 2018 07:19:49 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a17:902:be06:: with SMTP id r6-v6ls1820285pls.14.gmail; Wed,
 28 Mar 2018 07:19:47 -0700 (PDT)
X-Received: by 2002:a17:902:770f:: with SMTP id n15-v6mr4087544pll.92.1522246787951;
        Wed, 28 Mar 2018 07:19:47 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1522246787; cv=none;
        d=google.com; s=arc-20160816;
        b=HN0aKA8VqPaiQGLKlldERGlSiOCLWwceXE5EBRqds3Euamua6SgR6r46d/jWJwbBsI
         vxfNx4Tt2TjTyDjxGwt2i6BLAsIc2t0PLhhFyRhpyB0AGkinMfdQ3OvFiM3SJ2qr8BPn
         NqUEsjngOsUhjIYMki6l4pypztPetOAXMfACmHqPRrQCU95NRhj5VZzl6W328OaVTjbE
         04AQLdc/LtHq4sNi3auohyfgzWzN9eH0fKk1piSLMEcg4aFiDG5L6rUjJ8Y5qey2Gd37
         pZ53hYqSOoIyw6h/LUorrM7MJQty6ixdeTwnn5JOJ/mdor1p1tJsgiuuTpR917Zd9ctB
         TeMQ==
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=gf1uTgFACL3eL63aWfow+WXsg9J1EqjmeAcKv+pJ89c=;
        b=Ia80YwoKjWivN6xg3F/tWsX9SSiZkJA6ZEOqg2QZNzuJtmjM255oKRIVX50xfUSSuG
         6nt7ICt0cg/p2f5qXH8Vmf8HxyHhzmNX/h7y1UqkgSAsRs0AdmcCv/ijXn3/KR5U2ry7
         Y0ad2o2T8E8wGIAVfRhFZatQnZ3PKWYfjN/VV7gfO/3ZKVzSPZlg7LnjmQCqUHx7Z06u
         jUX9X3aY7hu6AwrkifDR5Wc0idiBHE4mugIWJrCceK4PHTV6/roL+m0xews0cAX8bKCk
         vFUoSs4ZHoZGGvQZ1RuIEzgxd/goGs+tautB7sl5digxENAf4wapn74trOmlSWekCDJD
         B7Ug==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=Lh+gJ6Mj;
       spf=pass (google.com: domain of via.usov@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=via.usov@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 w2sor1100264pgt.26.2018.03.28.07.19.47
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 28 Mar 2018 07:19:47 -0700 (PDT)
Received-SPF: pass (google.com: domain of via.usov@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.101.74.141 with SMTP id b13mr890434pgu.308.1522246787105;
 Wed, 28 Mar 2018 07:19:47 -0700 (PDT)
Original-Received: by 10.236.175.138 with HTTP; Wed, 28 Mar 2018 07:19:46 -0700 (PDT)
In-Reply-To: <018c02d9-7c65-4451-acc1-c49196fc7622@isocpp.org>
X-Original-Sender: via.usov@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=Lh+gJ6Mj;       spf=pass
 (google.com: domain of via.usov@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=via.usov@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:37528
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37528>

--089e08256408018a0f056879b30e
Content-Type: text/plain; charset="UTF-8"

On Wed, Mar 28, 2018 at 3:24 PM, Edward Catmur <ed@catmur.co.uk> wrote:

> No, you need magic to perform aliasing between any kind of array types.
[expr.add]/4 does not permit aliasing, so any array arithmetic must remain
within the bounds of an array that actually exists.

Let's tackle a simpler question first. Suppose:

int foo[5][2];
auto bar = reinterpret_cast<int*>(&foo[0][0]);

Are you saying that bar[2] is not well-defined?

Cheers,
V.

-- 
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/CAA7YVg1Tt-hwYej80qK_Cr2RxvBtP3aM%2BEZ7gqC4RKz6z9aGPw%40mail.gmail.com.

--089e08256408018a0f056879b30e
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 W=
ed, Mar 28, 2018 at 3:24 PM, Edward Catmur <span dir=3D"ltr">&lt;<a href=3D=
"mailto:ed@catmur.co.uk" target=3D"_blank">ed@catmur.co.uk</a>&gt;</span> w=
rote:<br><div><br></div><div>&gt; No, you need magic to perform aliasing be=
tween any kind of array types. [expr.add]/4 does not permit aliasing, so an=
y array arithmetic must remain within the bounds of an array that actually =
exists.</div><div><br></div><div>Let&#39;s tackle a simpler question first.=
 Suppose:</div><div><br></div><div>int foo[5][2];</div><div>auto bar =3D re=
interpret_cast&lt;int*&gt;(&amp;foo[0][0]);</div><div><br></div><div>Are yo=
u saying that bar[2] is not well-defined?</div><div><br></div><div>Cheers,<=
/div><div>V.</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/CAA7YVg1Tt-hwYej80qK_Cr2RxvBtP3aM%2BE=
Z7gqC4RKz6z9aGPw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAA7YVg1Tt-hwYe=
j80qK_Cr2RxvBtP3aM%2BEZ7gqC4RKz6z9aGPw%40mail.gmail.com</a>.<br />

--089e08256408018a0f056879b30e--

.
