220 33244 <4c552140-4029-4b28-af22-9e2843993516@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: federico.kircheis@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: safe integrals comparison
Date: Tue, 18 Jul 2017 09:57:03 -0700 (PDT)
Lines: 57
Approved: news@gmane.org
Message-ID: <4c552140-4029-4b28-af22-9e2843993516@isocpp.org>
References: <66f9bab2-7220-4bf1-afb7-77c5efa1bac3@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2173_573810066.1500397024009"
X-Trace: blaine.gmane.org 1500397028 15056 195.159.176.226 (18 Jul 2017 16:57:08 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 18 Jul 2017 16:57:08 +0000 (UTC)
Cc: federico.kircheis@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCZ3PBGHYEBBBYH3XDFQKGQEK62NJRI@isocpp.org Tue Jul 18 18:57:04 2017
Return-path: <std-proposals+bncBCZ3PBGHYEBBBYH3XDFQKGQEK62NJRI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f197.google.com ([209.85.192.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCZ3PBGHYEBBBYH3XDFQKGQEK62NJRI@isocpp.org>)
	id 1dXVnx-0003WH-16
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Jul 2017 18:57:01 +0200
Original-Received: by mail-pf0-f197.google.com with SMTP id v68sf25079800pfi.13
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Jul 2017 09:57:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc: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=sTsanUpMTcMYKXRjDU5dbSu9SwgUdTCGPBzzcC8EeeA=;
        b=Ptd5ACYAI7MAPbYnmETOdmqYEHMW24QgLldCMsoaVFppDGil5x4Tc7OKs5N03+3ffN
         sCE7NrZFicD6CFDM88pxYBib9MzHcPrg78fdog92Z6G5SR5Pfl7sJi/uM4gA24uJtxYj
         2RfhqHaFqw1ZmkG+rRai5Z61noEJJ8rTNwo5L9h4tuI9qRmXqhL9dZkUjLilomkc6X5F
         ZhYmMikfw1NGFAgfg5cT7QdLeqbgJxf8X+BrjCRHQYdljp/wV2aZyjXq+43hX1n2O08d
         +D3451Tbt5UZcdBvhkd0geoRfV73zCsxAJspLjHgmlgjUFNfx/EXZjXsf8cuplHk5ecy
         qkAg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc: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=sTsanUpMTcMYKXRjDU5dbSu9SwgUdTCGPBzzcC8EeeA=;
        b=ZGwW3PYEpDjPVGaxNZUueUVAf/HHnLi3RH6LG6aI/U84iVBaDGk2UpZZFtazxeaAVQ
         5IzIk6MwnHY8rwybgWbkL+UR2NXCahfltVtFK5cq6cAgGFum/lAFnmr5exm5ep82oKQq
         wDQ2uMW3WPdX3bwpuY6qp8JOfDiCf5M6sSWzUQRe/1Noda+CsTgWgksHhfGCEv1pW0Cq
         3qA3POaE62ZghdHpLtjO0MEp1BJzN1g7bf5I4uoUYIW2z+3QMXX64FW3LFdaAtn6qWhM
         ++YmruSTELjAmNQf81YB8LKmMap5RsJ1CZrougw8bFMUBw94l1T+bzhAkmWuWrGinP2V
         oIwQ==
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:cc: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=sTsanUpMTcMYKXRjDU5dbSu9SwgUdTCGPBzzcC8EeeA=;
        b=o4mEh4bT/ZZJGpge1NqtftppFFaIjpW38kD7aWYTTgCTTQ+RTpxIwSeIoir+FKjXVN
         jIqtK/Zi3p2U3axlmEIPw82gNXK3oJ28tITLG3qoWsvuzSgiUQ9MyNqY2dXxVci7j5pd
         Ixug525s7bls2vwfkC+n4bEdrU2Tc4E0FruSaQvQBaeNGMTnFX0y8OpBlzUYdhhzFIeO
         gl4uwrfIIA0wPcI+SFaULEY8yRxLXsjrUmD7nZdtKAiRrLHyynLfhFt7Q2hgiZ8s2FZp
         HedR62g/XlUyPoudKzcY399c3HOm6x4tDKG5xu6tXmrrCp37Jf6s+f5bjGKwbTZtAixH
         5Ikg==
X-Gm-Message-State: AIVw113IjGmJUMA5AXVtZDJSNGqHsCNtcg30XicqXThZ8loyFlpkzSSI
	RCxWdPmRQyOkQ8+P
X-Received: by 10.99.232.83 with SMTP id a19mr1602132pgk.127.1500397025958;
        Tue, 18 Jul 2017 09:57:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.182.213 with SMTP id g204ls2702395iof.29.gmail; Tue, 18
 Jul 2017 09:57:04 -0700 (PDT)
X-Received: by 10.31.50.145 with SMTP id y139mr9071vky.17.1500397024512;
        Tue, 18 Jul 2017 09:57:04 -0700 (PDT)
In-Reply-To: <66f9bab2-7220-4bf1-afb7-77c5efa1bac3@isocpp.org>
X-Original-Sender: federico.kircheis@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:33244
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33244>

------=_Part_2173_573810066.1500397024009
Content-Type: multipart/alternative; 
	boundary="----=_Part_2174_1656511224.1500397024009"

------=_Part_2174_1656511224.1500397024009
Content-Type: text/plain; charset="UTF-8"

Updated the proposal again,

I've removed the precision function, John McFarian was right about 
"std::numeric_limits<T>::digits" and set the version number to D0586R1, 
since it is still a draft.


is_losslessly_convertible might be a nice compile-time function, but I 
think that in_range with the std::numeric_limits<T>::max and 
std::numeric_limits<T>::min value will gave you the same result (and it can 
of course be used at compile-time too).

-- 
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/4c552140-4029-4b28-af22-9e2843993516%40isocpp.org.

------=_Part_2174_1656511224.1500397024009
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Updated the proposal again,<br><br>I&#39;ve removed the pr=
ecision function, John McFarian was right about &quot;std::numeric_limits&l=
t;T&gt;::digits&quot; and set the version number to D0586R1, since it is st=
ill a draft.<br><br><br>is_losslessly_convertible might be a nice compile-t=
ime function, but I think that in_range with the std::numeric_limits&lt;T&g=
t;::max and std::numeric_limits&lt;T&gt;::min value will gave you the same =
result (and it can of course be used at compile-time too).<br></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/4c552140-4029-4b28-af22-9e2843993516%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4c552140-4029-4b28-af22-9e2843993516=
%40isocpp.org</a>.<br />

------=_Part_2174_1656511224.1500397024009--

------=_Part_2173_573810066.1500397024009--

.
