220 29086 <5de60c76-a73b-4d29-bea5-a9eed19f4c67@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mihailnajdenov@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Removing trivial undefined behaviour
Date: Wed, 26 Oct 2016 01:26:24 -0700 (PDT)
Lines: 73
Approved: news@gmane.org
Message-ID: <5de60c76-a73b-4d29-bea5-a9eed19f4c67@isocpp.org>
References: <35daf87a-bf1d-46de-b16c-c2965fbadc8f@isocpp.org>
 <9e242562-aba1-4f8d-8e0a-b2de34f6a10b@isocpp.org>
 <d24d9d41-d5ba-47ed-8e98-915f84063a92@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1210_159454386.1477470384343"
X-Trace: blaine.gmane.org 1477470396 23635 195.159.176.226 (26 Oct 2016 08:26:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 26 Oct 2016 08:26:36 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUJ3A7GRAPRBMORYHAAKGQE7OBAGAA@isocpp.org Wed Oct 26 10:26:32 2016
Return-path: <std-proposals+bncBCUJ3A7GRAPRBMORYHAAKGQE7OBAGAA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f69.google.com ([209.85.213.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUJ3A7GRAPRBMORYHAAKGQE7OBAGAA@isocpp.org>)
	id 1bzJXV-0004d0-RS
	for gclcip-std-proposals@m.gmane.org; Wed, 26 Oct 2016 10:26:26 +0200
Original-Received: by mail-vk0-f69.google.com with SMTP id 137sf1247912vkl.12
        for <gclcip-std-proposals@m.gmane.org>; Wed, 26 Oct 2016 01:26:28 -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
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Lv+5IGHOZnPZL9ueIKmhxt2csoZEhEzh9hEvxjz1TyM=;
        b=qBjWNiRVlDMYb0d9D4MgQoVUoRAPxhtrur+x5A6/ylbNi8l3I0zus2m/WqPaEcKcf3
         CcOUIlp5ELuqSzC3UFLP1fL1CQKnW0wHpvx8FDRrwHCWD92czVR/sRcnfLr2UC+erqhU
         4+xCFR9bSwiTtB7QeEDo56eiaqcTcallceMnqhJtJpTuvUPe9qu4MtcynK3lpOcqCpDn
         8giW6bBXxDj57H6AyxWd6LJUqyXTEXwR7Hb7ANoXtwygtV5GBJXbKDi064ZQ9JpnhT/M
         Hzs4AhwWX2lXPLjuu+7zXe4FyWTCwq1vIMKIc0hLcwlOBrmrgxm5BDK/NfMbVZWpcyO+
         syNg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=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=Lv+5IGHOZnPZL9ueIKmhxt2csoZEhEzh9hEvxjz1TyM=;
        b=yVycyc+WpFv+ZLgr78gCu69/+N1/pQs01FakMNPnS9ms5hagXTAI99xqb5msqfYQps
         Vky1LpoHGQ9AIZrjxhMa9+mpb6Pz6FqTjhkceWQDarf/ShXIlH+3XIfwrhHborAKMsCR
         /NRqG3MpLq1vhgS+eBWtAHhw8TYmmJJ4PApiRu+oIfEeedrDxjgi9HAVPaxUS434YQVD
         m2y2gWlH6oCONMPmjRQodEnB3RVL4CtUF8o7C3JoIfyrALWdV3PYUGCn9544OvsKKU3o
         htM4C9i776i3Q7wgeHZQIgJ3bskVJZkaphDJ6cDxfcEznziYj2AT1Q4iwWEzERVRmZRK
         +wwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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=Lv+5IGHOZnPZL9ueIKmhxt2csoZEhEzh9hEvxjz1TyM=;
        b=YHJABW+oOUGDFClUjfmw+13g90pF8MVH/mGUTVP1z+AQRH6Pg6q2u+BS2NNbL/tVbT
         dVPOJpfWYbWLNkb10wuuXoEWNUPMVwPnDbppeDJqShBHoDxTW0GZtW2zNXv57PnRANtT
         XXSCRgzlg0AF65PRqH1/5S4lNIlT15kzgi7/7nPVzdntjpI12m1h2R06bn0cFrmIvYBa
         XiTImq6QX+KIsWjji7AR+ZGOr6iNM36as4m3V+hdK9vxwl7oFeuHyrfrorYSQ4rAdrDZ
         OAhh5dnkkdHBeqsT6XZPVROKLS92qI1KK8fsDfFM/3AwcMr+cudQdi5UrIwkGSnWCu+D
         SWGQ==
X-Gm-Message-State: ABUngvdcXuUUgw5UO4I76LEc9STNGaM0T2HZAbMFe7t733RQHUWrHeYv4G+Jp+oVhOeMOQ==
X-Received: by 10.31.208.199 with SMTP id h190mr107131vkg.9.1477470388100;
        Wed, 26 Oct 2016 01:26:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.19.200 with SMTP id 69ls302418iot.4.gmail; Wed, 26 Oct
 2016 01:26:25 -0700 (PDT)
X-Received: by 10.36.127.205 with SMTP id r196mr43347itc.4.1477470385415;
        Wed, 26 Oct 2016 01:26:25 -0700 (PDT)
In-Reply-To: <d24d9d41-d5ba-47ed-8e98-915f84063a92@isocpp.org>
X-Original-Sender: MihailNajdenov@gmail.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:29086
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29086>

------=_Part_1210_159454386.1477470384343
Content-Type: multipart/alternative; 
	boundary="----=_Part_1211_2094825598.1477470384343"

------=_Part_1211_2094825598.1477470384343
Content-Type: text/plain; charset=UTF-8



On Wednesday, October 26, 2016 at 10:20:55 AM UTC+3, 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.
>

But, this is a C function, C++ can't change it like that. 

C++ has an alternative - the one with the locale. 
Granted, it throws when the input is non-char, but it is not an UB. 

-- 
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/5de60c76-a73b-4d29-bea5-a9eed19f4c67%40isocpp.org.

------=_Part_1211_2094825598.1477470384343
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, October 26, 2016 at 10:20:55 AM UTC+=
3, Hans Guijt wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><br>On Wednesday, October 26, 2016 at 9:11:26 AM UTC+2, T. C. wrot=
e:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><br></div><=
div>Because they are meant to be used as isdigit((unsigned char) c).</div><=
/div></blockquote><div>=C2=A0</div><div>Great, in that case I&#39;m sure th=
ere is no opposition to changing the signature to reflect this requirement?=
 It&#39;s a much cleaner solution than requiring a cast in every invocation=
, after all.<br></div></div></blockquote><div><br></div><div>But, this is a=
=C2=A0C function, C++ can&#39;t change it like that. </div><div><br></div><=
div>C++ has an alternative - the one with the locale. </div><div>Granted, i=
t throws when the input is non-char, but it is not an UB.=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/5de60c76-a73b-4d29-bea5-a9eed19f4c67%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5de60c76-a73b-4d29-bea5-a9eed19f4c67=
%40isocpp.org</a>.<br />

------=_Part_1211_2094825598.1477470384343--

------=_Part_1210_159454386.1477470384343--

.
