220 30786 <5c9e5cc7-584b-8913-78f0-c0f4547dba3e@rrsd.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Robert Ramey <ramey@rrsd.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: safe integrals comparison
Date: Mon, 6 Feb 2017 09:40:38 -0800
Lines: 33
Approved: news@gmane.org
Message-ID: <5c9e5cc7-584b-8913-78f0-c0f4547dba3e@rrsd.com>
References: <66f9bab2-7220-4bf1-afb7-77c5efa1bac3@isocpp.org>
 <a734e3fd-d203-1ed6-d605-bf54f6a6e1e9@wanadoo.fr>
 <3f13d67f-ee5a-4f73-9bae-7f4f448e1027@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Trace: blaine.gmane.org 1486402848 26614 195.159.176.226 (6 Feb 2017 17:40:48 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 6 Feb 2017 17:40:48 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0)
 Gecko/20100101 Thunderbird/45.6.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDG73K7L6AIRBHXK4LCAKGQEYGFFTWA@isocpp.org Mon Feb 06 18:40:43 2017
Return-path: <std-proposals+bncBDG73K7L6AIRBHXK4LCAKGQEYGFFTWA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb0-f200.google.com ([209.85.213.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDG73K7L6AIRBHXK4LCAKGQEYGFFTWA@isocpp.org>)
	id 1canHP-0006fx-Es
	for gclcip-std-proposals@m.gmane.org; Mon, 06 Feb 2017 18:40:43 +0100
Original-Received: by mail-yb0-f200.google.com with SMTP id j82sf101409293ybg.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 06 Feb 2017 09:40:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-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=ALUfRW/sDDmBiefq9xOvOs5On1JtovVYXpzkeuaXLgg=;
        b=XeMfL73ad+VLDD+LxZIZ29yBE2HrtMEb+XWwEsM7QGRi7t2WxGVYAzVtfTDwuUw9wh
         OSDVeHMiC6t3yxDPh549zJl09FPwHHxrOq21jePpoTdRNxwyE48TFtnaNVdpOUsnwOOO
         YVE5AbkDTOj204FewgS1RwK+R2PnMOnJXw86G5MnPMPcVWSYmM/XbFBVB2WIi9Xj6zQg
         HGqhcXYgorIBIjPPJxgX/8Sxk7AdjE7JPkOK1abwrhaEEIXtzzCokTWEDa66bgzDYCVx
         07QftwJLxC0q8TN5G75dO/BmuLDO7PlQKD/7ZuJKxqHHmnRK3lms5a+ANxHynlRznPVg
         cADQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-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=ALUfRW/sDDmBiefq9xOvOs5On1JtovVYXpzkeuaXLgg=;
        b=IYXkw5QWW4zvhYHubT27oSQKTO2BkreJtmbnd7gVRl1L8bjeQ8VARO1NeTsaX8b0Mx
         W6raQHf7iSOyvQgBqciOiwtccnvpJ8uLMXAUdLIm4HGUWZ05YO61Mxdt8ibbEofrh7+3
         IXEas7A1BHbggulHU/T9LLr15U7pdAdGCAijvZs5byo+fl7gYwPNU90Anrc5Va/WBzWv
         vCEcbiO8n+6ojrNmPj2+Bqkd5iIkimxDLIL570DVUYDbRwrUbzCxuMYdRmlXogXX52in
         puIcM7yUubDBGxH4MEqdNrTCdF0zER+EqKR7Gi7RWVOSgqZ93j5oNXe4YBLkrz/6g3kQ
         VbrA==
X-Gm-Message-State: AIkVDXI2iv28N28dORWUTv2kU0NFkEE9zy+4u+wIS35OXqreVJsq4SB/x72ijtwU0IGiFQ==
X-Received: by 10.129.182.24 with SMTP id u24mr2387204ywh.121.1486402848656;
        Mon, 06 Feb 2017 09:40:48 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.131.34 with SMTP id f34ls3869185iod.36.gmail; Mon, 06 Feb
 2017 09:40:46 -0800 (PST)
X-Received: by 10.99.97.196 with SMTP id v187mr14803286pgb.175.1486402846624;
        Mon, 06 Feb 2017 09:40:46 -0800 (PST)
Original-Received: from cat.maple.relay.mailchannels.net (cat.maple.relay.mailchannels.net. [23.83.214.31])
        by mx.google.com with ESMTPS id s86si1318184pfd.82.2017.02.06.09.40.45
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 06 Feb 2017 09:40:46 -0800 (PST)
Received-SPF: pass (google.com: domain of ramey@rrsd.com designates 23.83.214.31 as permitted sender) client-ip=23.83.214.31;
X-Sender-Id: wwwh2|x-authuser|ramey@rrsd.com
Original-Received: from relay.mailchannels.net (localhost [127.0.0.1])
	by relay.mailchannels.net (Postfix) with ESMTP id 1104D101D2B
	for <std-proposals@isocpp.org>; Mon,  6 Feb 2017 17:40:45 +0000 (UTC)
Original-Received: from clippers.accountservergroup.com (unknown [100.96.6.198])
	by relay.mailchannels.net (Postfix) with ESMTPA id 6206B101863
	for <std-proposals@isocpp.org>; Mon,  6 Feb 2017 17:40:44 +0000 (UTC)
X-Sender-Id: wwwh2|x-authuser|ramey@rrsd.com
Original-Received: from clippers.accountservergroup.com ([UNAVAILABLE]. [172.20.90.159])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA)
	by 0.0.0.0:2500 (trex/5.7.18);
	Mon, 06 Feb 2017 17:40:44 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: wwwh2|x-authuser|ramey@rrsd.com
X-MailChannels-Auth-Id: wwwh2
X-MC-Loop-Signature: 1486402844538:75409804
X-MC-Ingress-Time: 1486402844538
Original-Received: from ip68-6-126-194.sb.sd.cox.net ([68.6.126.194]:56207 helo=Roberts-Mac-mini.local)
	by clippers.accountservergroup.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128)
	(Exim 4.87)
	(envelope-from <ramey@rrsd.com>)
	id 1canHN-0002OC-F8
	for std-proposals@isocpp.org; Mon, 06 Feb 2017 09:40:42 -0800
In-Reply-To: <3f13d67f-ee5a-4f73-9bae-7f4f448e1027@isocpp.org>
X-AuthUser: ramey@rrsd.com
X-Original-Sender: ramey@rrsd.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ramey@rrsd.com designates 23.83.214.31 as permitted sender) smtp.mailfrom=ramey@rrsd.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:30786
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30786>

On 2/6/17 9:30 AM, federico.kircheis@gmail.com wrote:
> I've not considered a wrapper, seems like a nice idea, I'll think about it.
>
>
> But before considering it, I think we should provide some basic
> functions for comparing values, the wrapper can be built on top of that.
>
> --
> 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
> <mailto:std-proposals+unsubscribe@isocpp.org>.
> To post to this group, send email to std-proposals@isocpp.org
> <mailto:std-proposals@isocpp.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/3f13d67f-ee5a-4f73-9bae-7f4f448e1027%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/3f13d67f-ee5a-4f73-9bae-7f4f448e1027%40isocpp.org?utm_medium=email&utm_source=footer>.

Have you looked at the safe_numerics library.  It can be found in the 
boost library incubator.  It is the subject of an article in the 
forthcoming version of ACCU Overload.  A version has been proposed for 
the C++ standard.  And it addresses all known issues related to 
comparison of integer types.

Robert Ramey

-- 
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/5c9e5cc7-584b-8913-78f0-c0f4547dba3e%40rrsd.com.

.
