220 31644 <6d0fbbab-c51f-4928-9901-ea5c9faba76a@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: yanp.bugz@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: stoi (stoll ...) accept string_view [insted of] string
Date: Wed, 15 Mar 2017 09:52:59 -0700 (PDT)
Lines: 88
Approved: news@gmane.org
Message-ID: <6d0fbbab-c51f-4928-9901-ea5c9faba76a@isocpp.org>
References: <2cd1e281-4a9f-4cbe-b04d-7f5739b5cf6f@isocpp.org>
 <a752b345-e365-4c05-a548-7782b19b196d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2879_11748965.1489596779281"
X-Trace: blaine.gmane.org 1489596780 28105 195.159.176.226 (15 Mar 2017 16:53:00 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 15 Mar 2017 16:53:00 +0000 (UTC)
Cc: yanp.bugz@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDHNXMWYVILBB27CUXDAKGQEVFEUMRQ@isocpp.org Wed Mar 15 17:52:56 2017
Return-path: <std-proposals+bncBDHNXMWYVILBB27CUXDAKGQEVFEUMRQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f200.google.com ([209.85.220.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDHNXMWYVILBB27CUXDAKGQEVFEUMRQ@isocpp.org>)
	id 1coCAQ-0006qt-Vz
	for gclcip-std-proposals@m.gmane.org; Wed, 15 Mar 2017 17:52:55 +0100
Original-Received: by mail-qk0-f200.google.com with SMTP id j127sf17576139qke.2
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Mar 2017 09:53:01 -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:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ClzX9cFulu4muOUkiPn3RFsOPnvuI8Rn2abnh/Je/Q8=;
        b=cAjlfNIeiw6Xjtv51LkMwJWn9aIBhJJ0IdDwpCKUchfR2RXShSqDo63W45PNjGOzxH
         TfLCxBShCfkxB7/7dxHkEkApYVimyb3nAy4oskM+xsZbyXxiTD8tjj2WxiOaRZjwvoW5
         UjR39ZXZCJ7qcndKHuRF5FeMRAHsEJR6jrDHM9ZGJNlUVqxkp+otqpu8VrGn6fHK2qDI
         Ue1Mh1Of7ZLGVWtfHwAtQu7+zJMrotrdQNfohFjm86LzHXn1SUlE6ki81MD/3/DIB7Sl
         ePrVl/eCYJqitAg/5ZiwlhXVRVwOAtkPlIIRe2h4rS7R2QW5B9wimdM0giMT/ceIgFfx
         tQLg==
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:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ClzX9cFulu4muOUkiPn3RFsOPnvuI8Rn2abnh/Je/Q8=;
        b=R7vHRz9pyYYu9ukrNDVxCtDtwzoYy/zQDfdSnEM2zmwmxWQ66zyA8bjyjRiv2+48PW
         k56L7BhO8c4SNMb0Avsczfyl+nu3zhqJNIAmRSEQ6mB4B9SbBBiYJG+E8YxlkaOaxC3b
         fuYV4AkUpRrjM2bCzFRVziMXzhk988zGUDHVUEu+cZStEABTbjtRQ/LqkpjLMghv0FtR
         6yrfLLRs6ZR3U4OhgGtk1HWoFXRLRN6ZdFa+pb5P2CbnzlnjATU11W6ilTwyXvhCnc+J
         0kamLEYZyBLEKXVcCgFQAPqjfl0j8vwf8o1Bf1DrEhbtkYfVkfuq6K3INRFKTzmasdqk
         6Ahw==
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=ClzX9cFulu4muOUkiPn3RFsOPnvuI8Rn2abnh/Je/Q8=;
        b=hHTMxAjHSD+FeJ7DOrr31FMT9+pQNpxftk7mUxFq0gdBdcRiO6svSGUJcl5nZSpfDU
         XwCeLtn2EUvkxQ7kPCUB0IYVEMLIXRJS3dcJPg0tVDzobUWN/NhhjZEycBWjzxE0kfUk
         PRgAP7nb3ijFyS1t8zLaX2x79bW3Ubmwl5g0cRly9hFEF5aftGaoWbybkVHVmhjPCJYF
         HvL1OD7Lx6fYlDi7HIMFXaqmHa8frgi5AgD3wYrRfC6Ya3GtkFOdIC1LDVeRYyi98Lbe
         INhdFGUInhD28Dl1wGjDJ2xrseKqH/JYoktCkJFCNA7KTfHIx3NYJAiNxaf2TViyAoH6
         fjlQ==
X-Gm-Message-State: AFeK/H0+XF6lKICwEx8NauBbB834ooCDREFRQUCp3L8fFfJ5ad7CwL+YTvIGFodLF48bZA==
X-Received: by 10.237.59.39 with SMTP id p36mr488090qte.34.1489596780790;
        Wed, 15 Mar 2017 09:53:00 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.5.176 with SMTP id 45ls2801167otd.49.gmail; Wed, 15 Mar
 2017 09:52:59 -0700 (PDT)
X-Received: by 10.157.11.143 with SMTP id 15mr495018oth.11.1489596779785;
        Wed, 15 Mar 2017 09:52:59 -0700 (PDT)
In-Reply-To: <a752b345-e365-4c05-a548-7782b19b196d@isocpp.org>
X-Original-Sender: yanp.bugz@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:31644
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31644>

------=_Part_2879_11748965.1489596779281
Content-Type: multipart/alternative; 
	boundary="----=_Part_2880_1310496326.1489596779281"

------=_Part_2880_1310496326.1489596779281
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I don't see any replacement for stoi. It is compact instead of from_chars=
=20
and strtol; handles errors (via exceptions, which are hated by some devs),=
=20
handier than streams.

=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 15 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2017 =D0=
=B3., 19:08:06 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=
=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> On Wednesday, March 15, 2017 at 11:54:57 AM UTC-4, yanp...@gmail.com=20
> wrote:
>>
>> I suggest adding string_view overloads to this group of functions. I=20
>> guess the reason why is obvious.
>>
>
> Personally, I'd rather have `string_view` overloads of the `from_chars`=
=20
> functions <http://en.cppreference.com/w/cpp/utility/from_chars>. Let=20
> `stoi` and its ilk die.
>

--=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/6d0fbbab-c51f-4928-9901-ea5c9faba76a%40isocpp.or=
g.

------=_Part_2880_1310496326.1489596779281
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I don&#39;t see any replacement for stoi. It is compact in=
stead of from_chars and strtol; handles errors (via exceptions, which are h=
ated by some devs), handier than streams.<br><br>=D1=81=D1=80=D0=B5=D0=B4=
=D0=B0, 15 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2017 =D0=B3., 19:08:06 UTC+3 =D0=
=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol=
 Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmai=
l_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;=
padding-left: 1ex;"><div dir=3D"ltr">On Wednesday, March 15, 2017 at 11:54:=
57 AM UTC-4, <a>yanp...@gmail.com</a> wrote:<blockquote class=3D"gmail_quot=
e" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr">I suggest adding string_view overloads to this gr=
oup of functions. I guess the reason why is obvious.<br></div></blockquote>=
<div><br>Personally, I&#39;d rather have `string_view` overloads of the <a =
href=3D"http://en.cppreference.com/w/cpp/utility/from_chars" target=3D"_bla=
nk" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.com/=
url?q\x3dhttp%3A%2F%2Fen.cppreference.com%2Fw%2Fcpp%2Futility%2Ffrom_chars\=
x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGjfZnbqLdsMssQqtty_VHnQFOsw&#39;;r=
eturn true;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\x3dhtt=
p%3A%2F%2Fen.cppreference.com%2Fw%2Fcpp%2Futility%2Ffrom_chars\x26sa\x3dD\x=
26sntz\x3d1\x26usg\x3dAFQjCNFGjfZnbqLdsMssQqtty_VHnQFOsw&#39;;return true;"=
>`from_chars` functions</a>. Let `stoi` and its ilk die.<br></div></div></b=
lockquote></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/6d0fbbab-c51f-4928-9901-ea5c9faba76a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/6d0fbbab-c51f-4928-9901-ea5c9faba76a=
%40isocpp.org</a>.<br />

------=_Part_2880_1310496326.1489596779281--

------=_Part_2879_11748965.1489596779281--

.
