220 4442 <6f1d5998-83c2-46f5-ba60-0841a278e424@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::putf now supports %N%, like Boost.Format
Date: Wed, 15 May 2013 23:16:51 -0700 (PDT)
Lines: 85
Approved: news@gmane.org
Message-ID: <6f1d5998-83c2-46f5-ba60-0841a278e424@isocpp.org>
References: <CAGsORuDc4y1ZeKttR1qtOPfLkgSgSkW7SK0-X2YAqE5zMyROVQ@mail.gmail.com>
 <a77deceb-f5b0-44e1-910f-5e0f73a2fa24@isocpp.org>
 <66ac5a48-8d1a-41f3-92ac-085c3b7de87a@isocpp.org>
 <75cd8f0a-81be-40d5-84a5-69287b3b18e2@isocpp.org>
 <df219a82-c893-4434-851a-6c6db040cd75@isocpp.org>
 <CANh-dXm5mekMRYmX5ig-PBnjFK=-wXWFUj4Vi9fs=eFOLusP0g@mail.gmail.com>
 <e17cb498-90c8-49ae-9bbf-c524162ac143@isocpp.org>
 <8a59c705-90ba-4e45-b9f8-4b0556e16032@isocpp.org>
 <2f4ea651-e0a4-4427-9e32-73a23c3a3e8a@isocpp.org>
 <83caa602-33d7-491a-9620-5ab7711fb054@isocpp.org>
 <58823f67-4fa4-4fda-9a3b-452c32bfee27@isocpp.org>
 <CANh-dXnhexy+V6=F_mcZAhPGoqAoRm6CSEoCWbHg1tYFvAsCdg@mail.gmail.com>
 <671ee342-ad52-4a4c-8dda-847a61babc7b@isocpp.org>
 <CANh-dXm+QKoZ-RPFXnhA-tPXwoKb6W40kE=ViCegTeZdbmLkww@mail.gmail.com>
 <c18528eb-7741-44f6-b84a-02775b0bf43c@isocpp.org>
 <CAGsORuC8EsWCgEoryMxCJPrCB=8YvjTMPbF2bgMasjT0NkQx0g@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_389_14437684.1368685011305"
X-Trace: ger.gmane.org 1368685017 29708 80.91.229.3 (16 May 2013 06:16:57 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 16 May 2013 06:16:57 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBVPT2GGAKGQEEG3EP7Y@isocpp.org Thu May 16 08:16:58 2013
Return-path: <std-proposals+bncBCEKFTV6ZUMBBVPT2GGAKGQEEG3EP7Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f198.google.com ([209.85.214.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBVPT2GGAKGQEEG3EP7Y@isocpp.org>)
	id 1UcrUm-0002FB-0m
	for gclcip-std-proposals@m.gmane.org; Thu, 16 May 2013 08:16:56 +0200
Original-Received: by mail-ob0-f198.google.com with SMTP id er7sf9959648obc.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 May 2013 23:16:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:date:from:to:message-id
         :in-reply-to:references:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=YDW/9llC2MA3yhmr54eeigkddIHE0TuECq5P4RcnWrs=;
        b=SAyMUm3hMlVbZ4C3xUtQTGN3z7CFB1fBDU6Qbui9nwFwW7uHSgx36BSJN9I8/VJXAk
         1fMqij/d7QqbEILOhIud/8mG85+1Ngit4DutuQLkZR8JO+1M3Do4pZLhWrNc2Yjiy5OR
         Xj1TmRxY+J9Q5nIrNyt1i9fDrqyrRxv78DCQ9i7jqQh0ETiPeIxvsQOiwu6H/NM7Wz4O
         oGbRcuzCZVVjCk059ZsUi0sk/i74oO5D9RGQkwDD+Yl7+KpL8UjBc0R/MeXRszZJBEuF
         zg/1Unqg3EOglnG/yAjwpwYEjUtCToa8g6M8wXGHDrxEaFs8KEg3LvGIQF7zDcY/bk0g
         RW6g==
X-Received: by 10.50.50.33 with SMTP id z1mr5901616ign.6.1368685014865;
        Wed, 15 May 2013 23:16:54 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.36.10 with SMTP id m10ls1927957igj.24.gmail; Wed, 15 May
 2013 23:16:52 -0700 (PDT)
X-Received: by 10.50.196.227 with SMTP id ip3mr1785034igc.10.1368685012522;
        Wed, 15 May 2013 23:16:52 -0700 (PDT)
In-Reply-To: <CAGsORuC8EsWCgEoryMxCJPrCB=8YvjTMPbF2bgMasjT0NkQx0g@mail.gmail.com>
X-Original-Sender: jmckesson@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4442
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4442>

------=_Part_389_14437684.1368685011305
Content-Type: text/plain; charset=ISO-8859-1

On Wednesday, May 15, 2013 9:54:14 PM UTC-7, Zhihao Yuan wrote:
>
> On Wed, May 15, 2013 at 11:08 PM, Nicol Bolas <jmck...@gmail.com<javascript:>> 
> wrote: 
> > That is, if you provided a 
> > standard-conforming printf format to putf, it would work as expected. If 
> you 
> > don't, then you get undefined behavior from putf. 
>
> Errr, not quite.  `putf` has no undefined behavior.  Everything not being 
> well 
> defined in `printf` results in a less feature complete (from the point 
> of view of 
> C-printf, but not iomanip) output, or a failbit on the stream.  I consider 
> any 
> thing not well-defined in `putf` as a bug (it makes no sense to have UB 
> in a string formatting facility, seriously). 
>

OK, I said that wrong, so let me rephrase.

If you have a standard-conforming printf formatting string, then `putf` 
will accept it and do the same thing. If your format string wasn't 
standard-conforming, then there's no guarantee of what printf will do. So 
`putf` doesn't need to accept it.

-- 

--- 
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/?hl=en.



------=_Part_389_14437684.1368685011305
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wednesday, May 15, 2013 9:54:14 PM UTC-7, Zhihao Yuan wrote:<blockquote =
class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1p=
x #ccc solid;padding-left: 1ex;">On Wed, May 15, 2013 at 11:08 PM, Nicol Bo=
las &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
u13Zde5miskJ">jmck...@gmail.com</a>&gt; wrote:
<br>&gt; That is, if you provided a
<br>&gt; standard-conforming printf format to putf, it would work as expect=
ed. If you
<br>&gt; don't, then you get undefined behavior from putf.
<br>
<br>Errr, not quite. &nbsp;`putf` has no undefined behavior. &nbsp;Everythi=
ng not being well
<br>defined in `printf` results in a less feature complete (from the point
<br>of view of
<br>C-printf, but not iomanip) output, or a failbit on the stream. &nbsp;I =
consider any
<br>thing not well-defined in `putf` as a bug (it makes no sense to have UB
<br>in a string formatting facility, seriously).
<br></blockquote><div><br>OK, I said that wrong, so let me rephrase.<br><br=
>If you have a standard-conforming printf formatting string, then `putf` wi=
ll accept it and do the same thing. If your format string wasn't standard-c=
onforming, then there's no guarantee of what printf will do. So `putf` does=
n't need to accept it.<br></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_389_14437684.1368685011305--

.
