220 29108 <CANh8DEmWMr0u==FPgaw4mnpv1UHCMnPfvonhJpwjTxuxw+La=g@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Matt Calabrese' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Removing trivial undefined behaviour
Date: Wed, 26 Oct 2016 11:44:58 -0400
Lines: 126
Approved: news@gmane.org
Message-ID: <CANh8DEmWMr0u==FPgaw4mnpv1UHCMnPfvonhJpwjTxuxw+La=g@mail.gmail.com>
References: <35daf87a-bf1d-46de-b16c-c2965fbadc8f@isocpp.org>
 <9e242562-aba1-4f8d-8e0a-b2de34f6a10b@isocpp.org> <d24d9d41-d5ba-47ed-8e98-915f84063a92@isocpp.org>
 <c976d139-ae31-4756-96a6-30a69d81f14d@isocpp.org> <CAOHCbiu0Hd7LsMkKGcvxvo7h3TJzjZAuXPWxNT0WuESUfrFCaw@mail.gmail.com>
 <1314a997-2f74-4b52-9755-bc9d1deb6982@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1143f082e0e3bc053fc681c1
X-Trace: blaine.gmane.org 1477496712 9750 195.159.176.226 (26 Oct 2016 15:45:12 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 26 Oct 2016 15:45:12 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCGNLO5F34OBB646YPAAKGQE2BF2BSY@isocpp.org Wed Oct 26 17:45:04 2016
Return-path: <std-proposals+bncBCGNLO5F34OBB646YPAAKGQE2BF2BSY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f200.google.com ([209.85.161.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCGNLO5F34OBB646YPAAKGQE2BF2BSY@isocpp.org>)
	id 1bzQNt-0000jn-Jt
	for gclcip-std-proposals@m.gmane.org; Wed, 26 Oct 2016 17:44:57 +0200
Original-Received: by mail-yw0-f200.google.com with SMTP id h139sf12317564ywc.9
        for <gclcip-std-proposals@m.gmane.org>; Wed, 26 Oct 2016 08:45:00 -0700 (PDT)
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:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=zhWFOmN7XwoYLAjHnLS3cl3HQbapF4k5SPRdSp21rwo=;
        b=I0sMDiY1m00BpsFGFgCllRJmYsNQJVseTmlJp8o+3DNQiDCej+49BIbRfMTjo19f2+
         +fNjYPNovF3fK/+Sh1L1VAdwxhXB/NfY1mGPo+9jSfQUpLZXkXyZ3K34PJnwnK2+oQgE
         mGDeNGFVQqF0HDUrW+9CJsUY9nXm4gtiW4dS2IiAcaEEzBrK93AE0TRElzBZdu59PbkQ
         tlbG45ktigf1IhPe2bGNTu9qrCqinqpWgMHj1IbX6iG7bTg6ZgdUmW5GDrX3pcFcHQ4R
         wvTgTbcGPGsHizw4Wj9pujUTDVjC5GApBSJnYaYcmiTenw77t5vR2iJa8IuaUxlxdhBr
         3rNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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=zhWFOmN7XwoYLAjHnLS3cl3HQbapF4k5SPRdSp21rwo=;
        b=mHOS1vYGICKaOZ630nq2+H3GfYbLudXC4NtbaFW4Y2+3vyVrgdB17oXFqRXPZeNXtD
         dk5l9EfNolrvHgsisQDR0xBjVIzx3RuHBoBKz3Bi7ynVoXNxV34Q6Jcj3EdwNTG6i7VN
         MHp+A0WowIX2Z5ELa2r951kdqZ5uE5f5JcZWNeEHRaXFeb1dxrQu51elma38Tn3QKyYa
         Tri+p46QRv+v4nllL9Y0EMI/BN05FuMUD2C5cyEBI8//D6sLmcrqmubdYpfRrzLSp6Nx
         VjZUOO/+eaYHfi3Z+HaCUL9EVEXOBv+H0gWmJ2FzNZiXG7t3+f30JsOp19T+ZRC7VaR2
         mEcg==
X-Gm-Message-State: ABUngvdT9MjPpvsc1dQ/bluH/0SKBOqxmliNL1o0HtD/pRO5HCJkVFmnyYTd/uAUclYXzQ==
X-Received: by 10.129.160.135 with SMTP id x129mr968637ywg.30.1477496699800;
        Wed, 26 Oct 2016 08:44:59 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.14.129 with SMTP id 1ls1772657otj.31.gmail; Wed, 26 Oct
 2016 08:44:59 -0700 (PDT)
X-Received: by 10.31.99.197 with SMTP id x188mr1646057vkb.125.1477496699068;
        Wed, 26 Oct 2016 08:44:59 -0700 (PDT)
Original-Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com. [2607:f8b0:400c:c05::233])
        by mx.google.com with ESMTPS id i187si1006087vkd.94.2016.10.26.08.44.59
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 26 Oct 2016 08:44:59 -0700 (PDT)
Received-SPF: pass (google.com: domain of calabrese@google.com designates 2607:f8b0:400c:c05::233 as permitted sender) client-ip=2607:f8b0:400c:c05::233;
Original-Received: by mail-vk0-x233.google.com with SMTP id 14so4791921vke.5
        for <std-proposals@isocpp.org>; Wed, 26 Oct 2016 08:44:59 -0700 (PDT)
X-Received: by 10.31.178.198 with SMTP id b189mr1668640vkf.70.1477496698604;
 Wed, 26 Oct 2016 08:44:58 -0700 (PDT)
Original-Received: by 10.103.120.149 with HTTP; Wed, 26 Oct 2016 08:44:58 -0700 (PDT)
In-Reply-To: <1314a997-2f74-4b52-9755-bc9d1deb6982@isocpp.org>
X-Original-Sender: calabrese@google.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@google.com;       spf=pass (google.com: domain of
 calabrese@google.com designates 2607:f8b0:400c:c05::233 as permitted sender)
 smtp.mailfrom=calabrese@google.com;       dmarc=pass (p=REJECT dis=NONE) header.from=google.com
X-Original-From: Matt Calabrese <calabrese@google.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:29108
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29108>

--001a1143f082e0e3bc053fc681c1
Content-Type: text/plain; charset=UTF-8

On Wed, Oct 26, 2016 at 11:34 AM, T. C. <rs2740@gmail.com> wrote:

>
>
> On Wednesday, October 26, 2016 at 9:19:15 AM UTC-4, Tony V E wrote:
>>
>>
>>
>> On Wed, Oct 26, 2016 at 4:28 AM, T. C. <rs2...@gmail.com> wrote:
>>
>>>
>>>
>>> On Wednesday, October 26, 2016 at 3:20:55 AM UTC-4, Hans Guijt wrote:
>>>>
>>>>
>>>> On Wednesday, October 26, 2016 at 9:11:26 AM UTC+2, T. C. wrote:
>>>>>
>>>>>
>>>>> Because they are meant to be used as isdigit((unsigned char) c).
>>>>>
>>>>
>>>> Great, in that case I'm sure there is no opposition to changing the
>>>> signature to reflect this requirement? It's a much cleaner solution than
>>>> requiring a cast in every invocation, after all.
>>>>
>>>>
>>>>
>>> The reason they take int is because they also accept EOF. That's C's
>>> style, for better or worse.
>>>
>>> In any event, there's no way in hell C++ is going to change this. It's a
>>> massive C compatibility break.
>>>
>>
>> We could maybe overload the function:
>>
>> int isdigit(int c);
>> bool isdigit(char c);
>>
>> No idea if that is a good idea.
>>
>>>
>>> --
>> Be seeing you,
>> Tony
>>
>
> That breaks anything that expects ::isdigit to be unambiguous (e.g., pass
> it to an algorithm).
>

I thought the standard doesn't sanction such uses of standard library
facilities, unless I'm mistaken.

-- 
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/CANh8DEmWMr0u%3D%3DFPgaw4mnpv1UHCMnPfvonhJpwjTxuxw%2BLa%3Dg%40mail.gmail.com.

--001a1143f082e0e3bc053fc681c1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, Oct 26, 2016 at 11:34 AM, T. C. <span dir=3D"ltr">&lt;<a href=
=3D"mailto:rs2740@gmail.com" target=3D"_blank">rs2740@gmail.com</a>&gt;</sp=
an> 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"><br><br>On We=
dnesday, October 26, 2016 at 9:19:15 AM UTC-4, Tony V E wrote:<span class=
=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex=
;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><div><br=
><div class=3D"gmail_quote">On Wed, Oct 26, 2016 at 4:28 AM, T. C. <span di=
r=3D"ltr">&lt;<a rel=3D"nofollow">rs2...@gmail.com</a>&gt;</span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span><br><br>On Wednesday=
, October 26, 2016 at 3:20:55 AM UTC-4, Hans Guijt wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr"><br>On Wednesday, October 26, 2016 =
at 9:11:26 AM UTC+2, T. C. wrote:<blockquote class=3D"gmail_quote" style=3D=
"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><div><br></div><div>Because they are meant to be used as isd=
igit((unsigned char) c).</div></div></blockquote><div>=C2=A0</div><div>Grea=
t, in that case I&#39;m sure there is no opposition to changing the signatu=
re to reflect this requirement? It&#39;s a much cleaner solution than requi=
ring a cast in every invocation, after all.<br><br><br></div></div></blockq=
uote><div><br></div></span><div>The reason they take int is because they al=
so accept EOF. That&#39;s C&#39;s style, for better or worse.</div><div><br=
></div><div>In any event, there&#39;s no way in hell C++ is going to change=
 this. It&#39;s a massive C compatibility break.</div></div></blockquote><d=
iv><br></div><div>We could maybe overload the function:<br><br></div><div>i=
nt isdigit(int c);<br></div><div>bool isdigit(char c);<br><br></div><div>No=
 idea if that is a good idea.<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span=
>

<p></p></span><br></blockquote></div>-- <br><div><div dir=3D"ltr"><div>Be s=
eeing you,<br></div>Tony<br></div></div></div></div></blockquote><div><br><=
/div></span><div>That breaks anything that expects ::isdigit=C2=A0to be una=
mbiguous (e.g., pass it to an algorithm).=C2=A0</div></div></blockquote><di=
v><br></div><div>I thought the standard doesn&#39;t sanction such uses of s=
tandard library facilities, unless I&#39;m mistaken.=C2=A0</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/CANh8DEmWMr0u%3D%3DFPgaw4mnpv1UHCMnPf=
vonhJpwjTxuxw%2BLa%3Dg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANh8DEmW=
Mr0u%3D%3DFPgaw4mnpv1UHCMnPfvonhJpwjTxuxw%2BLa%3Dg%40mail.gmail.com</a>.<br=
 />

--001a1143f082e0e3bc053fc681c1--

.
