220 13973 <346c989f-5000-450c-ae9e-ccd2fb22f1ee@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Sean Middleditch <sean.middleditch@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Default values for n4191 fold expressions
Date: Fri, 17 Oct 2014 00:12:55 -0700 (PDT)
Lines: 67
Approved: news@gmane.org
Message-ID: <346c989f-5000-450c-ae9e-ccd2fb22f1ee@isocpp.org>
References: <997390c5-072b-407a-bce9-22a29fc5e228@isocpp.org>
 <CAOfiQqmu_AfO=Xpp-BybyM1sje0i14iCVe7fV7hGjLzRW6CTBw@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_634_147595737.1413529975909"
X-Trace: ger.gmane.org 1413529986 28844 80.91.229.3 (17 Oct 2014 07:13:06 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 17 Oct 2014 07:13:06 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCDODCNR2QPRB6MCQORAKGQE2MSICRY@isocpp.org Fri Oct 17 09:12:59 2014
Return-path: <std-proposals+bncBCDODCNR2QPRB6MCQORAKGQE2MSICRY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vc0-f199.google.com ([209.85.220.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCDODCNR2QPRB6MCQORAKGQE2MSICRY@isocpp.org>)
	id 1Xf1ic-0002Ed-Ci
	for gclcip-std-proposals@m.gmane.org; Fri, 17 Oct 2014 09:12:58 +0200
Original-Received: by mail-vc0-f199.google.com with SMTP id le20sf494403vcb.2
        for <gclcip-std-proposals@m.gmane.org>; Fri, 17 Oct 2014 00:12:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to: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
         :content-type;
        bh=1bPSxAA1i6MDyBkFrElD594fI6iQm4kQnwtnOxYAFGE=;
        b=QMh52uGli2e2ImOChzxjAiFQkbP6ByFTrEsvz3VmsTFbmWufieyfqjGmVvp38GY31I
         eJ9aaaklYoByQTZnkxdQZmadiiZajX9ZRZP77+SHePRhHTJ99lFmbZZNh4zMFckTP0Lh
         8Mo0P05T7fftp61V9pa6ZwMTTWQbGZs7xtLszpDe6RQOTfID6g/DLkCF1hbdF4dPGjjQ
         SwN9PR7Vj8NytO8GtxyG44vvD+ywO5eESBfSyjxHaWYm1589G9uU3GaAHQxhg43X0LWQ
         /uw45TJ7QjvJ/N4g0RAI9U5tBqiRnE1UiigHQ05jL0J4Q3RP70/4Uz7DPNlYOea5lDmU
         qp5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to: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:content-type;
        bh=1bPSxAA1i6MDyBkFrElD594fI6iQm4kQnwtnOxYAFGE=;
        b=ZS+ZF6V4LCPPs4QlZqCG4P9f4X19MmQDzK2YQKw4RbqzXoV0dzyLQulYVrbEKxGCiq
         ZUo/QoN7x4qztiakQQ9I3x1Z0I68ypJPnRZJ6sQm7ulmrQjxC99InCpzOA60ON2grYTn
         PgIaXYoG8rExAXhFZWBm//jMzFtWc6ijDZ21Tkr8vIUE2/n42MAbqo8Xj2BXgJWRj8lJ
         mwCrYqFAcTgriuQ7Tsn7LeNf0X3IsqF0gXtNi7aqM+wkpEeyBijhkM4s/SA7SEy+IuZ3
         EAyq5Eq1mCotK08oXdhY7GwOtTULWlzumiiEfswjCnF04vZK2AFdeAAwTHW4cBlgCPEt
         V4xA==
X-Gm-Message-State: ALoCoQmxPKY7iHCEIbwYBHZTEmRuMJAmmDuaaswIA1nk1r2htM7dzyZOLzcD5CeHH7elL2pTY2CL
X-Received: by 10.236.39.9 with SMTP id c9mr4624292yhb.41.1413529977578;
        Fri, 17 Oct 2014 00:12:57 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.18.163 with SMTP id 35ls798012ios.91.gmail; Fri, 17 Oct
 2014 00:12:57 -0700 (PDT)
X-Received: by 10.50.20.198 with SMTP id p6mr391721ige.10.1413529976989;
        Fri, 17 Oct 2014 00:12:56 -0700 (PDT)
In-Reply-To: <CAOfiQqmu_AfO=Xpp-BybyM1sje0i14iCVe7fV7hGjLzRW6CTBw@mail.gmail.com>
X-Original-Sender: Sean.Middleditch@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>, <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:13973
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13973>

------=_Part_634_147595737.1413529975909
Content-Type: text/plain; charset=UTF-8

On Wednesday, October 15, 2014 7:22:47 PM UTC-7, Richard Smith wrote:
>
> while if it is a prvalue int this gives a string of length 1 containing a 
>> nul character.
>
>
> Yes, there's some risk this might happen accidentally. (If you anticipate 
> the problem, you can write "auto s = (to_string(args) + ... + 
> std::string());".) But it seems like a mistake that std::string implicitly 
> converts from an int in a surprising way, and fixing that might be a better 
> approach for this particular problem.
>

Can it be fixed without breaking user code?

>

-- 

--- 
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/.

------=_Part_634_147595737.1413529975909
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, October 15, 2014 7:22:47 PM UTC-7, Richard S=
mith wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><d=
iv><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,=
204);border-left-style:solid;padding-left:1ex">while if it is a prvalue int=
 this gives a string of length 1 containing a nul character.</blockquote><d=
iv><br></div><div>Yes, there's some risk this might happen accidentally. (I=
f you anticipate the problem, you can write "auto s =3D (to_string(args) + =
.... + std::string());".) But it seems like a mistake that std::string impli=
citly converts from an int in a surprising way, and fixing that might be a =
better approach for this particular problem.</div></div></div></div></block=
quote><div><br></div><div>Can it be fixed without breaking user code?</div>=
<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bor=
der-left: 1px #ccc solid;padding-left: 1ex;">
</blockquote></div>

<p></p>

-- <br />
<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 <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_634_147595737.1413529975909--

.
