220 37558 <9a9a7837-a014-4893-b0a0-75571921b3a3@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Edward Catmur <ed@catmur.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Allowing std::complex's magic permission for
 other types
Date: Thu, 29 Mar 2018 08:35:16 -0700 (PDT)
Lines: 87
Approved: news@gmane.org
Message-ID: <9a9a7837-a014-4893-b0a0-75571921b3a3@isocpp.org>
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> <CAA7YVg1Tt-hwYej80qK_Cr2RxvBtP3aM+EZ7gqC4RKz6z9aGPw@mail.gmail.com>
 <1e25a8ae-4752-4fc0-8c89-639cef53121c@isocpp.org> <CAA7YVg1ZHes2s7mMGqGAgh0JTrNOq0gHmSNFgdRJo6yOb78Q-Q@mail.gmail.com>
 <CAJnLdObRm=N+cYEaAV+K6_Nnvoc4ef9Efimw-YNrkFYMQothFg@mail.gmail.com>
 <CAA7YVg20tNjDzVSiQpoutAcFSuTNf+71mrxHRA9gWRmXv5Ja6A@mail.gmail.com> <CAJnLdObgKF5w_wGFFJXM6ALS3jS6E5di+_zKZHcwh67GDyZcXQ@mail.gmail.com>
 <CAA7YVg3yg4tnv5W91LbRqV0Q7dx9EyWPuddfoRYANS__X2eiXA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_3023_132653232.1522337716286"
X-Trace: blaine.gmane.org 1522337595 23493 195.159.176.226 (29 Mar 2018 15:33:15 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 29 Mar 2018 15:33:15 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDZLZTXF7UJBBNMP6TKQKGQERKQAU3I@isocpp.org Thu Mar 29 17:33:11 2018
Return-path: <std-proposals+bncBDZLZTXF7UJBBNMP6TKQKGQERKQAU3I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f200.google.com ([209.85.217.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDZLZTXF7UJBBNMP6TKQKGQERKQAU3I@isocpp.org>)
	id 1f1ZY7-00061J-2H
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Mar 2018 17:33:11 +0200
Original-Received: by mail-ua0-f200.google.com with SMTP id y5sf4093216uaa.15
        for <gclcip-std-proposals@m.gmane.org>; Thu, 29 Mar 2018 08:35:19 -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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=dVhdeH7Y5WW1UpSy9mo6j5iDpHabw5uBXKlTNRLDdUs=;
        b=vBj5/6Dn+dU5JTB47DUVDeMzV5Y7JHelnpKsszMJsi+aqmiKA0RSw2PQfGh9/0svEb
         iITFVlFUCTm79wCJHAuqV0HkwS6+tkWYY/4tXmr+JA4cJXzv3Z+yf0kJ8WHJ8yS0axrq
         dx4jSA6T/KwITXy4TVtNXOegj97BEfxyJQTVEFbd2eY57ruiVfS38DBaBKJv/R9CnHWa
         /WgMwxfo0jRMDY1a0mC2fDc0P2gQcw+RwKoliWhsMda9+2kAQt6+AUAUdTMxbm9aqXmJ
         zZnR9CPUy4m4tNnF7bNddQk9kDbMxj+/1BeJoGi7MJVZ2wMDAYCbPoy86raO6dJmjhh1
         Nj6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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=dVhdeH7Y5WW1UpSy9mo6j5iDpHabw5uBXKlTNRLDdUs=;
        b=FqgENA5L6JToIkAoofxylnm/Z66xoAoTTFsZ4zvxLW4vs6A1aYH/33TkyRSwJiNIOs
         dNOFwN+y5ZUtQge16dEM6ceqtjOH5cfz/6BBD9sz6mHG9tvkl7olaqSqvaXnpPBfhXAV
         g5jD9hp7YorNrLDzLUCKxgt/JgyltVEJupG2lQcG64IcLgVR5YbyQzd790vc4wxNxs4K
         oxPMGJjh/nSEaI67KfBmYC+bnQSYzpEwJpNiRUP59q5fIt1kSSjQtib18i8r0ZG+CLLk
         1JTshtDkkXLXUyAnU9IkiegRy5kn4uKdo5qycnguydnXrOb+efswAxm+WA76Orpy+uxs
         2EtQ==
X-Gm-Message-State: AElRT7E6M23l+umoRskMod8UOOKnRXpCatnG9+APPzQq9F1JGLTMx6SH
	yqCEuP0t2b25ABv60ETUVE/b7w==
X-Google-Smtp-Source: AG47ELsMNGLuS1HGS19CqGSeQscWYI2Vk5g3C9ldtjZwa98SFBcJ9c0pC42bSWg4C6lE9el0r9uW2Q==
X-Received: by 10.176.73.194 with SMTP id f2mr22476107uad.122.1522337718518;
        Thu, 29 Mar 2018 08:35:18 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.208.1 with SMTP id h1ls3825324vkg.19.gmail; Thu, 29 Mar
 2018 08:35:17 -0700 (PDT)
X-Received: by 10.31.32.148 with SMTP id g142mr1805693vkg.1.1522337716774;
        Thu, 29 Mar 2018 08:35:16 -0700 (PDT)
In-Reply-To: <CAA7YVg3yg4tnv5W91LbRqV0Q7dx9EyWPuddfoRYANS__X2eiXA@mail.gmail.com>
X-Original-Sender: ed@catmur.co.uk
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:37558
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37558>

------=_Part_3023_132653232.1522337716286
Content-Type: multipart/alternative; 
	boundary="----=_Part_3024_140286881.1522337716286"

------=_Part_3024_140286881.1522337716286
Content-Type: text/plain; charset="UTF-8"



On Thursday, 29 March 2018 07:17:27 UTC+1, Viacheslav Usov wrote:
>
> On Wed, Mar 28, 2018 at 6:38 PM, 'Edward Catmur' via ISO C++ Standard - 
> Future Proposals <std-pr...@isocpp.org <javascript:>> wrote:
>
> > That's [expr.eq]/2.2, which comes after 2.1 and is guarded by an 
> "Otherwise".
>
> Per 2.2., "they compare equal" and your prior statements of unspecified 
> comparison are non sequitur.
>
> So, now, we have pointers to int (bar + 2) and baz representing the same 
> address and comparing equal, and baz[0] is well defined.
>
> What do you say about bar[2]?
>

I think it's reasonably clear that bar[2] is UB, even though bar + 2 
compares equal to baz and baz[0] is well defined. See [basic.compound]/3.


> 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/9a9a7837-a014-4893-b0a0-75571921b3a3%40isocpp.org.

------=_Part_3024_140286881.1522337716286
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Thursday, 29 March 2018 07:17:27 UTC+1, Viaches=
lav Usov  wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r"><div><div class=3D"gmail_quote">On Wed, Mar 28, 2018 at 6:38 PM, &#39;Ed=
ward Catmur&#39; via ISO C++ Standard - Future Proposals <span dir=3D"ltr">=
&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"v28m=
LW7jAwAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;=
;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;">s=
td-pr...@isocpp.org</a>&gt;</span> wrote:<br><div><br></div><div>&gt; That&=
#39;s [expr.eq]/2.2, which comes after 2.1 and is guarded by an &quot;Other=
wise&quot;.</div><div><br></div><div>Per 2.2., &quot;they compare equal&quo=
t; and your prior statements of unspecified comparison are non sequitur.</d=
iv><div><br></div><div>So, now, we have pointers to int (bar + 2) and baz r=
epresenting the same address and comparing equal, and baz[0] is well define=
d.</div><div><br></div><div>What do you say about bar[2]?</div></div></div>=
</div></blockquote><div><br></div><div>I think it&#39;s reasonably clear th=
at bar[2] is UB, even though bar + 2 compares equal to baz and baz[0] is we=
ll defined. See [basic.compound]/3.</div><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr"><div><div class=3D"gmail_quote=
"><div><br></div><div>Cheers,</div><div>V.</div></div></div></div>
</blockquote></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/9a9a7837-a014-4893-b0a0-75571921b3a3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9a9a7837-a014-4893-b0a0-75571921b3a3=
%40isocpp.org</a>.<br />

------=_Part_3024_140286881.1522337716286--

------=_Part_3023_132653232.1522337716286--

.
