220 17952 <555A54B8.8000007@gmx.net> article
Path: news.gmane.org!not-for-mail
From: Jens Maurer <Jens.Maurer@gmx.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Parsing Numbers
Date: Mon, 18 May 2015 23:08:08 +0200
Lines: 22
Approved: news@gmane.org
Message-ID: <555A54B8.8000007@gmx.net>
References: <eb5c19d6-074f-4ee4-8e2d-6d92349eb4be@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1431983300 12639 80.91.229.3 (18 May 2015 21:08:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 18 May 2015 21:08:20 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDPMTYGK64JRBOVJ5GVAKGQEBS3HJSQ@isocpp.org Mon May 18 23:08:12 2015
Return-path: <std-proposals+bncBDPMTYGK64JRBOVJ5GVAKGQEBS3HJSQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f199.google.com ([209.85.212.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDPMTYGK64JRBOVJ5GVAKGQEBS3HJSQ@isocpp.org>)
	id 1YuSGi-00042S-6X
	for gclcip-std-proposals@m.gmane.org; Mon, 18 May 2015 23:08:12 +0200
Original-Received: by wivs14 with SMTP id s14sf27731597wiv.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 18 May 2015 14:08:11 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :subject:references:in-reply-to:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=shWKqLMClzfoZwl89DiYrCgwviLJAJFZl/6ugibqPSA=;
        b=ShBnSnzERKT0kDh+/ISRfHXBgaboXSTmh+AZVH4mxX97k+1zLdwVdQ3xBvUAkGX15T
         eg5AezeSLZcIQoXGBUh4U8MmG8K184KYq3HKGrHGlgzBSBKjVc7PXEBgRli4aaK8cu9H
         I47jM4sIsrw9EU5OW4FzPQDHztMkzPtAKgbXHEQSlybd6ZROm0sp5l3OWEFd8KT719n+
         fULyjRdL5aa/XOjl9gfti+7wzoekCMEOdG0ykRs0/DD3sfipoUF8QrkQF3QVaUx2IYVL
         HY/mJq7zOb+QbwoTCpzw/hxLFJN26g/ENBU7pX5FQ7ZbnEVgVoPyCYC7pmm3yjsofsWw
         EGlA==
X-Gm-Message-State: ALoCoQnoZuy4h6FPZqLzTb6p2ZTpZA/xOdWYd1ugadEDIJLAJz1sNYdJPtYMSzEjMI8DLJInmk/Q
X-Received: by 10.152.206.36 with SMTP id ll4mr19218418lac.6.1431983291545;
        Mon, 18 May 2015 14:08:11 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.101.227 with SMTP id fj3ls510519wib.46.canary; Mon, 18 May
 2015 14:08:10 -0700 (PDT)
X-Received: by 10.180.88.72 with SMTP id be8mr25600437wib.45.1431983290451;
        Mon, 18 May 2015 14:08:10 -0700 (PDT)
Original-Received: from mout.gmx.net (mout.gmx.net. [212.227.15.15])
        by mx.google.com with ESMTPS id v8si14673185wiz.39.2015.05.18.14.08.10
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 18 May 2015 14:08:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of Jens.Maurer@gmx.net designates 212.227.15.15 as permitted sender) client-ip=212.227.15.15;
Original-Received: from [192.168.2.100] ([178.7.77.17]) by mail.gmx.com (mrgmx001) with
 ESMTPSA (Nemesis) id 0MfF6I-1YVdDP2rlq-00On5Y for <std-proposals@isocpp.org>;
 Mon, 18 May 2015 23:08:09 +0200
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1
In-Reply-To: <eb5c19d6-074f-4ee4-8e2d-6d92349eb4be@isocpp.org>
X-Provags-ID: V03:K0:/fEsK/L301boylMFgQbz69R6vOGIyd2szymoHU9IvTxpIUPUx5j
 qip+8wU5SxQjiyaRE7WreCZ+uWtkzKd2vXnQ5D9j001JMUFNAVCOzceDnJyO7QOthjjb6k0
 Le7WPQqkFAIUi9xksi5pjPS929RSk3v1f0hjWwTFv9ssvMt+6wUrg6PihMt3qXPrly86Soa
 Ak2yzKVqPynwDQKFhCfKA==
X-UI-Out-Filterresults: notjunk:1;
X-Original-Sender: Jens.Maurer@gmx.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of Jens.Maurer@gmx.net designates 212.227.15.15 as permitted sender) smtp.mail=Jens.Maurer@gmx.net
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:17952
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/17952>

On 05/18/2015 08:34 PM, Olaf van der Spek wrote:
> So, what about this one?
> 
> optional<T> parse(string_view, std::size_t* pos = 0, int base = 10);
> 
> An alternative could be:
> 
> error_code parse(T&, string_view, std::size_t* pos = 0, int base = 10);

I would appreciate if there would be a compile-time choice for base 2,
base 8, base 10, base 16, not (only) a facility with a runtime parameter.

Jens

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
