220 13980 <54413B5E.4020800@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: Default values for n4191 fold expressions
Date: Fri, 17 Oct 2014 17:53:02 +0200
Lines: 40
Approved: news@gmane.org
Message-ID: <54413B5E.4020800@gmx.net>
References: <997390c5-072b-407a-bce9-22a29fc5e228@isocpp.org> <CAOfiQqmu_AfO=Xpp-BybyM1sje0i14iCVe7fV7hGjLzRW6CTBw@mail.gmail.com> <346c989f-5000-450c-ae9e-ccd2fb22f1ee@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
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1413561199 8694 80.91.229.3 (17 Oct 2014 15:53:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 17 Oct 2014 15:53:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDPMTYGK64JRBYPWQSRAKGQESRETINI@isocpp.org Fri Oct 17 17:53:12 2014
Return-path: <std-proposals+bncBDPMTYGK64JRBYPWQSRAKGQESRETINI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f69.google.com ([209.85.215.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDPMTYGK64JRBYPWQSRAKGQESRETINI@isocpp.org>)
	id 1Xf9pz-00028E-EH
	for gclcip-std-proposals@m.gmane.org; Fri, 17 Oct 2014 17:53:07 +0200
Original-Received: by mail-la0-f69.google.com with SMTP id q1sf645797lam.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 17 Oct 2014 08:53:07 -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:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type:content-transfer-encoding;
        bh=nINYdJCwXN0EOF0iafR6BOKkhqmLNLzP+Llu1MYvZnQ=;
        b=S+WzPN2vtRUXy4hbeZdKmiAOi6TsfE6RqxkWhxB8AyaFDOf/7l4aGPx9NV+M1+U2ne
         w3p3lW0qnAxekumOcs7yL8OCafQvquktcW4gaOMS25yXFOM4oPJJmXik1eA3ghyZJK+8
         4z/JV0B+UXkqZzduJ6VyXlYSXPMk7jMeo17ZGr7sLSorrg97XEyaorK6TkikdVHDUxx+
         lANlTDhsCNpctlDjdip2u3a7jQ91DObRnSYIt171vIFjHr94he5d+OmKxG26HL9NwgPK
         FJoxlo7Xvs83gUyriCe6M+CyZ4S/SMmiQtyfUD9127ofi+df7LuzSPUqs92yBD5Q0M/1
         bac 
X-Gm-Message-State: ALoCoQm+CEriQy3JGpeNoL5aKGd/729KcgR0SwicPJwCxSqcNFlf4fL9ge0a6Ax4s1+EWVtf2Vai
X-Received: by 10.180.98.165 with SMTP id ej5mr780692wib.1.1413561187112;
        Fri, 17 Oct 2014 08:53:07 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.3.132 with SMTP id c4ls250991lac.88.gmail; Fri, 17 Oct
 2014 08:53:04 -0700 (PDT)
X-Received: by 10.152.234.199 with SMTP id ug7mr9852125lac.26.1413561184738;
        Fri, 17 Oct 2014 08:53:04 -0700 (PDT)
Original-Received: from mout.gmx.net (mout.gmx.net. [212.227.15.18])
        by mx.google.com with ESMTPS id l3si2634219laf.89.2014.10.17.08.53.04
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 17 Oct 2014 08:53:04 -0700 (PDT)
Received-SPF: pass (google.com: domain of Jens.Maurer@gmx.net designates 212.227.15.18 as permitted sender) client-ip=212.227.15.18;
Original-Received: from [192.168.2.100] ([178.7.71.65]) by mail.gmx.com (mrgmx002) with
 ESMTPSA (Nemesis) id 0MbPPQ-1XOjPo04we-00IjA4 for <std-proposals@isocpp.org>;
 Fri, 17 Oct 2014 17:53:04 +0200
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1
In-Reply-To: <346c989f-5000-450c-ae9e-ccd2fb22f1ee@isocpp.org>
X-Provags-ID: V03:K0:Pk/TisqgrGC77/YJkioUhv98QE2fW1ak6fEXLSpAcMMog7Dr4aB
 fAn3YOi3ZA+zAQwT3Kekwu7do7pfb39PgzvOqDUTkV1aLCespFWhg2Pg5L6D2Bb3ssm1Uwr
 8avNpXTiEzeWb48oXRYSgb7gutt74tUJOgRO3v2q0eUNfU6VR7oXn3ysb8hh8w2DAhpi3fH
 jzllz+5InItAKV7fSyu/Q==
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.18 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:13980
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13980>

On 10/17/2014 09:12 AM, Sean Middleditch wrote:
> On Wednesday, October 15, 2014 7:22:47 PM UTC-7, Richard Smith wrote:
>=20
>         while if it is a prvalue int this gives a string of length 1 cont=
aining a nul character.
>=20
>=20
>     Yes, there's some risk this might happen accidentally. (If you antici=
pate the problem, you can write "auto s =3D (to_string(args) + ... + std::s=
tring());".) But it seems like a mistake that std::string implicitly conver=
ts from an int in a surprising way, and fixing that might be a better appro=
ach for this particular problem.
>=20
>=20
> Can it be fixed without breaking user code?

That's probably hard.

We could have a
   std::string(int) =3D delete

constructor overload that catches literal "0", but

  std::string(const char *)

is certainly in widespread use.

Jens

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
