220 37356 <462175d9-78de-4b2b-b440-3e317f3733a9@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jakob Riedle <jakob.riedle@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Pointer overload for ||
Date: Fri, 16 Mar 2018 06:47:44 -0700 (PDT)
Lines: 92
Approved: news@gmane.org
Message-ID: <462175d9-78de-4b2b-b440-3e317f3733a9@isocpp.org>
References: <1fea07df-46a6-4df2-865a-849be8f8d129@isocpp.org>
 <CANiq72kL7HQf2oS5THm8bxzurhzoc7uhNQq3S9+zvBce2yMZZQ@mail.gmail.com>
 <c7cd5d95-0031-4e50-b7a1-9adcff695bd2@isocpp.org> <CALvx3hYz84MdBu_WsixPmWf8N=9FY4BiqOv+Lon21nF2m_f0Ow@mail.gmail.com>
 <CALvx3hbrrb6tJJYEG7S9q1YrRWSXXi+OCW9n1siXRfFjjxTDYA@mail.gmail.com> <CANiq72kNstxnyLTCOBfNorEiyudTijCAUHwH4DsoT14WqcNs4w@mail.gmail.com>
 <CAANG=kWjgCt-+pKOwWk6BgwNZ9ZECd9twWwq_FC1f3WPEiNw=A@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_1344_2017498275.1521208064482"
X-Trace: blaine.gmane.org 1521207947 21517 195.159.176.226 (16 Mar 2018 13:45:47 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 16 Mar 2018 13:45:47 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCX2XNFO6MPRBAMWV7KQKGQE5274MJI@isocpp.org Fri Mar 16 14:45:43 2018
Return-path: <std-proposals+bncBCX2XNFO6MPRBAMWV7KQKGQE5274MJI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f199.google.com ([209.85.217.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCX2XNFO6MPRBAMWV7KQKGQE5274MJI@isocpp.org>)
	id 1ewpfy-0005UB-2c
	for gclcip-std-proposals@m.gmane.org; Fri, 16 Mar 2018 14:45:42 +0100
Original-Received: by mail-ua0-f199.google.com with SMTP id j20sf6252874uan.10
        for <gclcip-std-proposals@m.gmane.org>; Fri, 16 Mar 2018 06:47:49 -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=lmfxM2/lbKnzIsqRdxX3Gu5lhqzUflf9lLlzBizatyI=;
        b=wCY+lhoWGZZZzG0uwGkuFGLAtbx1rGQp1RvbwToPSNy1r5CQAjxGsDPc1R+3ZWURKD
         gNStbxQq6WhG+vM0IisHyorIVrzrG/fOa/euecfjjajICsjX4Vg/VIOTXCSrEaN7aeUD
         Ft7eMKvfRJgPk5FQLed++D79eKpJ2p5RTk2k89KWL5jRrmAtmPGHcp4F8k/trrBSUhG4
         /wxDEy/Ce2CXAdThrNla35sQCqYOE4buDkFvufAmh3FqCcplybUiCyP3zSt6z6IOdb1V
         TyYHXqwKOK8BKL9Q2/KH49cOYsR+KAxMWaRUP+J6Pv5hQTRGmu+nPrmPOFRwrB/UCRj3
         /t+g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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=lmfxM2/lbKnzIsqRdxX3Gu5lhqzUflf9lLlzBizatyI=;
        b=Y5smqWEDorcI9kx5egpzjBeB1UbrPBsB3Hj1zjs1KYZu3qsdByUxA+H0Uc1bRPL5Pr
         xvxJ5uFvgy2uHrBhjGEutcrkVgzQj6Eg4w1FbeTZESmMdcOneHe/lkWJnn9pYZbSoomB
         2akwxbFdmcZKNskQ4FUiTokZK1j3b6er+xongQFXhTHTxqR9ngskVCtL+xiQlOxExEM2
         NBvRVXX+aUxW/zFW4FbqZrH+SZhwNFA1a1td3yLwOBY1HZ8pv7HhyMw7VPvcig+0uRGQ
         k41fjHZEsavDygs9lsAWG5otgN8f3xP02K8E7zTITByhNczbnc4/VLuHLwm5nNrDCylT
         74ww==
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=lmfxM2/lbKnzIsqRdxX3Gu5lhqzUflf9lLlzBizatyI=;
        b=R345On+XVQE747cFIhh07wUyObQdN0o4KmcmE8MjYAnoTlD6DdDH8HS9gdWgmpWVZQ
         F0timpxEOq77wVbvaf0wCnCshP2N2nfyhYXxulGGz0qvnOQEljUNg/9AxVOv3sEGOxRY
         qV0u3HrWvrGsN7yxEKxAEPom9gcUouwri3Pi8dSIosXwPnBm4Y6iMpwdBWUqiFXg8m1E
         3HQU+5ksjrl6Q+U4L/8zUl6bZg2ZHe39k7dTwRHmzyIb1hWSqgcg+3sUUbN5ixh3aw35
         eDUW9jUSq3+ulpYu6/KjLFc9TM4nBz/N9dPF80QKhJ+BWgFd+8JJjczwelgeer9pgOaO
         WxLQ==
X-Gm-Message-State: AElRT7F4Cgt9PQv4twVSc8lY21HMHsVfIaVIVAG/gFRbNFqkRF7PBgRO
	G7yiWJD2tip0DBcf+gHMfCowUQ==
X-Google-Smtp-Source: AG47ELusI/C2fj5EsHs4OGAVwSkonJKMcflb30gV3Ecyh0PH1IdEFM3clGQ54fjZaVyEcZb+wJUX2w==
X-Received: by 10.176.21.174 with SMTP id i43mr713655uae.125.1521208068807;
        Fri, 16 Mar 2018 06:47:48 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.208.1 with SMTP id h1ls3966065vkg.19.gmail; Fri, 16 Mar
 2018 06:47:45 -0700 (PDT)
X-Received: by 10.31.178.81 with SMTP id b78mr215938vkf.14.1521208065083;
        Fri, 16 Mar 2018 06:47:45 -0700 (PDT)
In-Reply-To: <CAANG=kWjgCt-+pKOwWk6BgwNZ9ZECd9twWwq_FC1f3WPEiNw=A@mail.gmail.com>
X-Original-Sender: jakob.riedle@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:37356
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37356>

------=_Part_1344_2017498275.1521208064482
Content-Type: multipart/alternative; 
	boundary="----=_Part_1345_1270386213.1521208064482"

------=_Part_1345_1270386213.1521208064482
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



Am Dienstag, 13. M=C3=A4rz 2018 12:26:46 UTC+1 schrieb Ga=C5=A1per A=C5=BEm=
an:
>
> But my point was we *already have* an operator with the exact semantics o=
f=20
> the macro above - it's just a gnu extension. We could just propose that!
>
> https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html
>
> x =3D x?:new int;
>
> It's unambiguous, it's obvious it's a conditional, it's a one-liner, and=
=20
> more importantly, it can be used for way more than just pointers. Oh, and=
=20
> we have implementations and knowledge of how it behaves, and it's also no=
t=20
> a weird new form of || or |.
>
> It also fails to compile if "x" and the expression if x is falsy don't=20
> have a common type, which is *also* important.
>

+1. I'm all about it!=20

--=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/462175d9-78de-4b2b-b440-3e317f3733a9%40isocpp.or=
g.

------=_Part_1345_1270386213.1521208064482
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>Am Dienstag, 13. M=C3=A4rz 2018 12:26:46 UTC+1 sch=
rieb Ga=C5=A1per A=C5=BEman:<blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><d=
iv dir=3D"ltr">But my point was we *already have* an operator with the exac=
t semantics of the macro above - it&#39;s just a gnu extension. We could ju=
st propose that!<div><br></div><div><a href=3D"https://gcc.gnu.org/onlinedo=
cs/gcc/Conditionals.html" target=3D"_blank" rel=3D"nofollow" onmousedown=3D=
"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgcc.gnu.org=
%2Fonlinedocs%2Fgcc%2FConditionals.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dA=
FQjCNH23eFTLoIJ2YmyrzhOWFGs_Ak7kg&#39;;return true;" onclick=3D"this.href=
=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgcc.gnu.org%2Fonlined=
ocs%2Fgcc%2FConditionals.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH23eF=
TLoIJ2YmyrzhOWFGs_Ak7kg&#39;;return true;">https://gcc.gnu.org/<wbr>onlined=
ocs/gcc/Conditionals.<wbr>html</a><br></div><div><br></div><div>x =3D x?:ne=
w int;</div><div><br></div><div>It&#39;s unambiguous, it&#39;s obvious it&#=
39;s a conditional, it&#39;s a one-liner, and more importantly, it can be u=
sed for way more than just pointers. Oh, and we have implementations and kn=
owledge of how it behaves, and it&#39;s also not a weird new form of || or =
|.</div><div><br></div><div>It also fails to compile if &quot;x&quot; and t=
he expression if x is falsy don&#39;t have a common type, which is *also* i=
mportant.</div></div></blockquote><div><br></div><div>+1. I&#39;m all about=
 it!=C2=A0</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/462175d9-78de-4b2b-b440-3e317f3733a9%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/462175d9-78de-4b2b-b440-3e317f3733a9=
%40isocpp.org</a>.<br />

------=_Part_1345_1270386213.1521208064482--

------=_Part_1344_2017498275.1521208064482--

.
