220 36853 <CAC+0CCOSZHaTA=YPSDU8Add7mE_BYcYPRCmGW8TRPtZhdqL8Hw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jake Arkinstall <jake.arkinstall@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: String interpolation
Date: Fri, 9 Feb 2018 21:13:07 +0000
Lines: 261
Approved: news@gmane.org
Message-ID: <CAC+0CCOSZHaTA=YPSDU8Add7mE_BYcYPRCmGW8TRPtZhdqL8Hw@mail.gmail.com>
References: <356d5835-f1bf-4699-94f5-0b2d3d0b9c0e@isocpp.org>
 <CAMD6iD9aT26x8GQHnQL+kuj3Rq8fVQSfYYFtvTnFidkf6jU_ag@mail.gmail.com>
 <25CCF885-86AD-4D51-8F5C-C46376D34DE0@gmail.com> <4890431.TR9UepuQra@tjmaciei-mobl1>
 <CALvx3hac77b6Z=EOWzKqynALi1-352OvY0dnnOer8rN6tfa01g@mail.gmail.com> <1cdb6300-7397-46d7-bce9-62e6e8dac40b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a11c0327aba08bb0564cdfe15"
X-Trace: blaine.gmane.org 1518210686 9621 195.159.176.226 (9 Feb 2018 21:11:26 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 9 Feb 2018 21:11:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDCZX3WUUQFRBZE57DJQKGQEOJ5REWA@isocpp.org Fri Feb 09 22:11:21 2018
Return-path: <std-proposals+bncBDCZX3WUUQFRBZE57DJQKGQEOJ5REWA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot0-f199.google.com ([74.125.82.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDCZX3WUUQFRBZE57DJQKGQEOJ5REWA@isocpp.org>)
	id 1ekFwm-0001BQ-Ho
	for gclcip-std-proposals@m.gmane.org; Fri, 09 Feb 2018 22:11:04 +0100
Original-Received: by mail-ot0-f199.google.com with SMTP id t1sf3589875oth.21
        for <gclcip-std-proposals@m.gmane.org>; Fri, 09 Feb 2018 13:13:10 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1518210789; cv=pass;
        d=google.com; s=arc-20160816;
        b=L1PCUEB3SJdtGtSPZsrgjEmAyJxK1ErC3f8+EGoOzfjY1kHs2LAbUusnzAWIOtEyx9
         NgTDIJcYXdsbaXmNrulzI4peQI0HF8vCMb+7ErMQctbjgTfVbEaP7WVZrx8w6Hu4fJPN
         twZ/D6JG6fg/DpIW3gvbgAXOw+PWIaOfSo9KQ6nVL3V1RaRJWzbDM3ymwcLxT0rd1Kt2
         N0JEGgLMCNS9Oy8SYOYGz0zt1Qlls8qhBt1iLK3ZJlzvsZHN56nc32pCApgXWHP3+HcR
         VqtnXqbums9C0N81SYXMLupHEkFd4q7e6PwbTGIhucZTZEoz2To9pY1dBCeuU5NR0hg4
         A84A==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=wtVNnP4CwD4lMs3oapWlOhGrVVXMPYINrSJrKzjyPPs=;
        b=qo63BdhGwl5XNP3Ppe7ZzBn5uM78lFQXlRza7MQKG8wFRJMhvxX4yYsSF6TGvWXXEx
         7tEBGR+Rt+oJV0kSo5chB+/oO/o6KAOd5o1CGFJhZISwqYx9qczOFFljERjbDkT0grYo
         fxjNntxrCjx/QcRC5ghfOfKv9oYg8BrSkgAGfd+BjkSaVwGdKRVu8/8XxXW0CdtDoPfn
         2G8PKAEtpk6NV38dKMzlY/ER9Rlti/6dd45xwW8RHb/W/bPY3c7XiVkReYD2Z1pEHZxq
         2S8CGF/vvB6raW+E7sKqClMtdAivje6RaFdGBPsWhYYn2X5JctYiCRMF8ZAbK9I5uE91
         YRMg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=OY7QlqWw;
       spf=pass (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jake.arkinstall@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject: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;
        bh=wtVNnP4CwD4lMs3oapWlOhGrVVXMPYINrSJrKzjyPPs=;
        b=MXi9nCNCKLKP5ObQt4E7N6FArrqhy/iC1OarlOZreWi4mQVXlAUtFVbA1hdga61BHi
         29tM4yUQOrWXs+f1LhI6HWgBLBfmsgAbNnkdYWT8IIW/BxOp6Idi1hQ6GLdIknZ64sII
         jxcT3hGYelZMjXaB7GKOvDf74vPKjlOZnY+oN8PqVOXXkTCfvp/V0uclTl4TGL8edS7b
         dcIVXBwNaL/ny4Ps9ZT66PCx9OCGkVsTnn9we5AB/qZVAYvo77CrrcTzlZccN2j1YaaK
         XXK+Whcy/hfNCdu1am3jtSzTo8tzqo9yMa2sT4uH7ah7Qk0B/uDJ0H7nWmo+yLj2iq4t
         lzSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=wtVNnP4CwD4lMs3oapWlOhGrVVXMPYINrSJrKzjyPPs=;
        b=WnQjJXbhBl8eRMuZgcew/8UHS9UdiBJ1yu64D9SFV6iEzf5FrAQFNEoWJPfBlNiX3h
         VfhG5fBMe7DERZkA8lm2My8aRFLPGmvwI9FLulOTrFxW8SfVefAxwoYyoKTsPrXWw2/9
         IJ2GPcWEMydWmKiMvn2eyxRuhdIer7TSvTGEnq+tJY/ZMcvdNk5dhVmBmCMXMIFQ4yvp
         9HsxdioMl8jik3R/Os9zgr59OEzFW/2PHZIBw68hShaZc97m1p3/ejzLZBAAHEhQ0qdN
         XNtxqf0G1POobjvQiqQdw6wScGKBUS6uz/bZC/cg0Fv1WKGY4WbzK72oE4TqvW7lkR88
         2NvA==
X-Gm-Message-State: APf1xPARVfyw+Uckd4U7cVO2N68Nmyrpl21qmJ3JcYW+Z/MlwUe0aYee
	IubO/Xya9hAzEDgFVJNcal1HfQ==
X-Google-Smtp-Source: AH8x224tKM1g/ac140mLROj8FN/VcSghFMeSgKbvtDaD4lMtzwZ93owF++PMY/+uz+/GyIeW4k/SzQ==
X-Received: by 10.157.43.1 with SMTP id o1mr2536836otb.28.1518210789750;
        Fri, 09 Feb 2018 13:13:09 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.44.249 with SMTP id e54ls2309293otd.16.gmail; Fri, 09 Feb
 2018 13:13:08 -0800 (PST)
X-Received: by 10.157.14.45 with SMTP id c42mr3244207otc.59.1518210788690;
        Fri, 09 Feb 2018 13:13:08 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1518210788; cv=none;
        d=google.com; s=arc-20160816;
        b=SbaTCIfJgfjIP+kfkQI7YFjaPRHegH67d4FxBif2cYO86cDr6agkYGKNGnih9QGasF
         pBLA+7z2kQI5NF5xikdbbfhlmHvTfjBfqdQ1+pMgU3kxr/szQtEyO/5g7R0uFh70PbnM
         Zdu3fy3LanSoMV8cvyRCrQit29hAWKkvP+qpVf+XGo6zuoIm0tHiAh50gSqnX5WmNoJ7
         MOYvKBUqJ3MeM3KRYIGtFFqrxaxKWvWZJ2PDUrc6EXJ121RYnmvwF1Fzt5Cl8xN+Z2NP
         0RoBIdIm52YTxaf19mfyWYEjJKWvE8Sns65LkbYW6A/DpFziJjZo3t6TeBCxsIKhcFUb
         IJGw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=eZyFjSRhUPZ0DMmQFhvynueTiRuubNrB44EFRbF4/e0=;
        b=LnYDxUgL9J96FF+7AivD6GePKtMCeC2DAL7yvPnlQizqss0QBest62jYONdhtz/rHZ
         5N99cmkWYaa/dvdqJWUjqzPtUl7yoids7EaCGF5Zk/1fu5iG0BhovzrVJRD5MeYZifNU
         k3zjnX92BnLkz4xPbJvlYz4U/qYFCiKhLi2wEkpDrNCVoAilkvBbd+tGZj+721HGQDKH
         uMqiZWU+V5/DVD009lAvYr307CQ0slHCpeS2wzczmB5lsSacpzlcU3ggy/Tg0Wo6yszB
         E3/dAJn4CXGoJLoanvK2VDHJRCadjIlJzIaPfP8TF7s5Mwg3F1p9ZEv2B6aaXStrVAhm
         /86Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=OY7QlqWw;
       spf=pass (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jake.arkinstall@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id d186sor1356628oia.52.2018.02.09.13.13.08
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Fri, 09 Feb 2018 13:13:08 -0800 (PST)
Received-SPF: pass (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.202.4.204 with SMTP id 195mr2849658oie.262.1518210788229;
 Fri, 09 Feb 2018 13:13:08 -0800 (PST)
Original-Received: by 10.168.151.129 with HTTP; Fri, 9 Feb 2018 13:13:07 -0800 (PST)
Original-Received: by 10.168.151.129 with HTTP; Fri, 9 Feb 2018 13:13:07 -0800 (PST)
In-Reply-To: <1cdb6300-7397-46d7-bce9-62e6e8dac40b@isocpp.org>
X-Original-Sender: jake.arkinstall@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=OY7QlqWw;       spf=pass
 (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=jake.arkinstall@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:36853
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/36853>

--001a11c0327aba08bb0564cdfe15
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On 9 Feb 2018 20:51, <inkwizytoryankes@gmail.com> wrote:


Minimal version than could be added to C++ is new string prefix `F`
(because we have `R`, `u`, `u8` and `U` already, and `$` is outside of
source characters) that enable mixing code with string literals.
As Marcel Kr=C3=BCger wrote, language could transform this string literal t=
o:
F"testA{a}test{{B}}"_x; =3D> operator""_x("testA"_x, a, "test{B}"_x); //usi=
ng
same postfix to parse sub-literals
FR"aa(x{b}y)aa"_x; =3D> operator""_x(R"aa(x)aa"_x, b, R"aa(y)aa"_x); //it
have precedence over `R` prefix



Rest will be implemented by library, this mean `F"a {5} b"` will not
compile because there is no matching operator. stl could add this operator
for `s` postfix, that will use `std::to_string` for conversing all
arguments:
template<typename... Parts>
std::string operator""s(Parts&&... p) { return std::to_string(std::forward<
Parts>(p)) + ...; }

int main()
{
    auto x =3D F"Test {{a}} =3D {10+5}"s; //x =3D=3D "Test {a} =3D 15"s
}
No iosteam, and even more it could if someone relay desire to have
localizations:

F"Test {356*10}"_loc("Prod {0} OK!", "fr") =3D=3D "Prod 3.560,00 OK!";

Only drawback is some template bloat but this is probably acceptable cost.


This is exactly the kind of thing I'm aiming for, although I dont believe
string conversion and concatenation to be the final solution - unless my
recall of benchmarks is out of date, streams are faster than string
concatenation.

This being said, similar ideas can be applied to utilise the fmt library,
for example.

--=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/CAC%2B0CCOSZHaTA%3DYPSDU8Add7mE_BYcYPRCmGW8TRPtZ=
hdqL8Hw%40mail.gmail.com.

--001a11c0327aba08bb0564cdfe15
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">On 9 Feb 2018 20:51,  &lt;<a href=3D"mailto:inkwizytoryankes@gmai=
l.com">inkwizytoryankes@gmail.com</a>&gt; wrote:<br type=3D"attribution"><b=
lockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"quoted-text"><br></di=
v><div>Minimal version than could be added to C++ is new string prefix `F` =
(because we have `R`, `u`, `u8` and `U` already, and `$` is outside of sour=
ce characters) that enable mixing code with string literals.<br>As Marcel K=
r=C3=BCger wrote, language could transform this string literal to:<br><div =
style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);bo=
rder-style:solid;border-width:1px" class=3D"m_9005655817011445617prettyprin=
t"><code class=3D"m_9005655817011445617prettyprint"><div class=3D"m_9005655=
817011445617subprettyprint"><span style=3D"color:#000" class=3D"m_900565581=
7011445617styled-by-prettify">F</span><span style=3D"color:#080" class=3D"m=
_9005655817011445617styled-by-prettify">&quot;testA{a}test{{B}}&quot;</span=
><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettif=
y">_x</span><span style=3D"color:#660" class=3D"m_9005655817011445617styled=
-by-prettify">;</span><span style=3D"color:#000" class=3D"m_900565581701144=
5617styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_90056=
55817011445617styled-by-prettify">=3D&gt;</span><span style=3D"color:#000" =
class=3D"m_9005655817011445617styled-by-prettify"> </span><span style=3D"co=
lor:#008" class=3D"m_9005655817011445617styled-by-prettify">operator</span>=
<span style=3D"color:#080" class=3D"m_9005655817011445617styled-by-prettify=
">&quot;&quot;</span><span style=3D"color:#000" class=3D"m_9005655817011445=
617styled-by-prettify">_x</span><span style=3D"color:#660" class=3D"m_90056=
55817011445617styled-by-prettify">(</span><span style=3D"color:#080" class=
=3D"m_9005655817011445617styled-by-prettify">&quot;testA&quot;</span><span =
style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify">_x</=
span><span style=3D"color:#660" class=3D"m_9005655817011445617styled-by-pre=
ttify">,</span><span style=3D"color:#000" class=3D"m_9005655817011445617sty=
led-by-prettify"> a</span><span style=3D"color:#660" class=3D"m_90056558170=
11445617styled-by-prettify">,</span><span style=3D"color:#000" class=3D"m_9=
005655817011445617styled-by-prettify"> </span><span style=3D"color:#080" cl=
ass=3D"m_9005655817011445617styled-by-prettify">&quot;test{B}&quot;</span><=
span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"=
>_x</span><span style=3D"color:#660" class=3D"m_9005655817011445617styled-b=
y-prettify">);</span><span style=3D"color:#000" class=3D"m_9005655817011445=
617styled-by-prettify"> </span><span style=3D"color:#800" class=3D"m_900565=
5817011445617styled-by-prettify">//using same postfix to parse sub-literals=
</span><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-p=
rettify"><br>FR</span><span style=3D"color:#080" class=3D"m_900565581701144=
5617styled-by-prettify">&quot;aa(x{b}y)aa&quot;</span><span style=3D"color:=
#000" class=3D"m_9005655817011445617styled-by-prettify">_x</span><span styl=
e=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">;</span>=
<span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify=
"> </span><span style=3D"color:#660" class=3D"m_9005655817011445617styled-b=
y-prettify">=3D&gt;</span><span style=3D"color:#000" class=3D"m_90056558170=
11445617styled-by-prettify"> </span><span style=3D"color:#008" class=3D"m_9=
005655817011445617styled-by-prettify">operator</span><span style=3D"color:#=
080" class=3D"m_9005655817011445617styled-by-prettify">&quot;&quot;</span><=
span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"=
>_x</span><span style=3D"color:#660" class=3D"m_9005655817011445617styled-b=
y-prettify">(</span><span style=3D"color:#000" class=3D"m_90056558170114456=
17styled-by-prettify">R</span><span style=3D"color:#080" class=3D"m_9005655=
817011445617styled-by-prettify">&quot;aa(x)aa&quot;</span><span style=3D"co=
lor:#000" class=3D"m_9005655817011445617styled-by-prettify">_x</span><span =
style=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">,</s=
pan><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-pret=
tify"> b</span><span style=3D"color:#660" class=3D"m_9005655817011445617sty=
led-by-prettify">,</span><span style=3D"color:#000" class=3D"m_900565581701=
1445617styled-by-prettify"> R</span><span style=3D"color:#080" class=3D"m_9=
005655817011445617styled-by-prettify">&quot;aa(y)aa&quot;</span><span style=
=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify">_x</span>=
<span style=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify=
">);</span><span style=3D"color:#000" class=3D"m_9005655817011445617styled-=
by-prettify"> </span><span style=3D"color:#800" class=3D"m_9005655817011445=
617styled-by-prettify">//it have precedence over `R` prefix</span></div></c=
ode></div><br><br><br>Rest will be implemented by library, this mean `F&quo=
t;a {5} b&quot;` will not compile because there is no matching operator. st=
l could add this operator for `s` postfix, that will use `std::to_string` f=
or conversing all arguments:<br><div style=3D"background-color:rgb(250,250,=
250);border-color:rgb(187,187,187);border-style:solid;border-width:1px" cla=
ss=3D"m_9005655817011445617prettyprint"><code class=3D"m_900565581701144561=
7prettyprint"><div class=3D"m_9005655817011445617subprettyprint"><span styl=
e=3D"color:#008" class=3D"m_9005655817011445617styled-by-prettify">template=
</span><span style=3D"color:#660" class=3D"m_9005655817011445617styled-by-p=
rettify">&lt;</span><span style=3D"color:#008" class=3D"m_90056558170114456=
17styled-by-prettify">typename</span><span style=3D"color:#660" class=3D"m_=
9005655817011445617styled-by-prettify">...</span><span style=3D"color:#000"=
 class=3D"m_9005655817011445617styled-by-prettify"> </span><span style=3D"c=
olor:#606" class=3D"m_9005655817011445617styled-by-prettify">Parts</span><s=
pan style=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">=
&gt;</span><span style=3D"color:#000" class=3D"m_9005655817011445617styled-=
by-prettify"><br>std</span><span style=3D"color:#660" class=3D"m_9005655817=
011445617styled-by-prettify">::</span><span style=3D"color:#008" class=3D"m=
_9005655817011445617styled-by-prettify">string</span><span style=3D"color:#=
000" class=3D"m_9005655817011445617styled-by-prettify"> </span><span style=
=3D"color:#008" class=3D"m_9005655817011445617styled-by-prettify">operator<=
/span><span style=3D"color:#080" class=3D"m_9005655817011445617styled-by-pr=
ettify">&quot;&quot;</span><span style=3D"color:#000" class=3D"m_9005655817=
011445617styled-by-prettify">s</span><span style=3D"color:#660" class=3D"m_=
9005655817011445617styled-by-prettify">(</span><span style=3D"color:#606" c=
lass=3D"m_9005655817011445617styled-by-prettify">Parts</span><span style=3D=
"color:#660" class=3D"m_9005655817011445617styled-by-prettify">&amp;&amp;..=
..</span><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-=
prettify"> p</span><span style=3D"color:#660" class=3D"m_900565581701144561=
7styled-by-prettify">)</span><span style=3D"color:#000" class=3D"m_90056558=
17011445617styled-by-prettify"> </span><span style=3D"color:#660" class=3D"=
m_9005655817011445617styled-by-prettify">{</span><span style=3D"color:#000"=
 class=3D"m_9005655817011445617styled-by-prettify"> </span><span style=3D"c=
olor:#008" class=3D"m_9005655817011445617styled-by-prettify">return</span><=
span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"=
> std</span><span style=3D"color:#660" class=3D"m_9005655817011445617styled=
-by-prettify">::</span><span style=3D"color:#000" class=3D"m_90056558170114=
45617styled-by-prettify">to_string</span><span style=3D"color:#660" class=
=3D"m_9005655817011445617styled-by-prettify">(</span><span style=3D"color:#=
000" class=3D"m_9005655817011445617styled-by-prettify">std</span><span styl=
e=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">::</span=
><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettif=
y">forward</span><span style=3D"color:#660" class=3D"m_9005655817011445617s=
tyled-by-prettify">&lt;</span><span style=3D"color:#606" class=3D"m_9005655=
817011445617styled-by-prettify">Pa<wbr>rts</span><span style=3D"color:#660"=
 class=3D"m_9005655817011445617styled-by-prettify">&gt;(</span><span style=
=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify">p</span><=
span style=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify"=
>))</span><span style=3D"color:#000" class=3D"m_9005655817011445617styled-b=
y-prettify"> </span><span style=3D"color:#660" class=3D"m_90056558170114456=
17styled-by-prettify">+</span><span style=3D"color:#000" class=3D"m_9005655=
817011445617styled-by-prettify"> </span><span style=3D"color:#660" class=3D=
"m_9005655817011445617styled-by-prettify">...;</span><span style=3D"color:#=
000" class=3D"m_9005655817011445617styled-by-prettify"> </span><span style=
=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">}</span><=
span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"=
><br><br></span><span style=3D"color:#008" class=3D"m_9005655817011445617st=
yled-by-prettify">int</span><span style=3D"color:#000" class=3D"m_900565581=
7011445617styled-by-prettify"> main</span><span style=3D"color:#660" class=
=3D"m_9005655817011445617styled-by-prettify">()</span><span style=3D"color:=
#000" class=3D"m_9005655817011445617styled-by-prettify"><br></span><span st=
yle=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">{</spa=
n><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-pretti=
fy"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#008" class=3D"m_90056558=
17011445617styled-by-prettify">auto</span><span style=3D"color:#000" class=
=3D"m_9005655817011445617styled-by-prettify"> x </span><span style=3D"color=
:#660" class=3D"m_9005655817011445617styled-by-prettify">=3D</span><span st=
yle=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"> F</sp=
an><span style=3D"color:#080" class=3D"m_9005655817011445617styled-by-prett=
ify">&quot;Test {{a}} =3D {10+5}&quot;</span><span style=3D"color:#000" cla=
ss=3D"m_9005655817011445617styled-by-prettify">s</span><span style=3D"color=
:#660" class=3D"m_9005655817011445617styled-by-prettify">;</span><span styl=
e=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"> </span>=
<span style=3D"color:#800" class=3D"m_9005655817011445617styled-by-prettify=
">//x =3D=3D &quot;Test {a} =3D 15&quot;s</span><span style=3D"color:#000" =
class=3D"m_9005655817011445617styled-by-prettify"><br></span><span style=3D=
"color:#660" class=3D"m_9005655817011445617styled-by-prettify">}</span><spa=
n style=3D"color:#000" class=3D"m_9005655817011445617styled-by-prettify"><b=
r></span></div></code></div><code>No iosteam, and even more it could if som=
eone relay desire to have localizations:<br><br><div style=3D"background-co=
lor:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;borde=
r-width:1px" class=3D"m_9005655817011445617prettyprint"><code class=3D"m_90=
05655817011445617prettyprint"><div class=3D"m_9005655817011445617subprettyp=
rint"><span style=3D"color:#000" class=3D"m_9005655817011445617styled-by-pr=
ettify">F</span><span style=3D"color:#080" class=3D"m_9005655817011445617st=
yled-by-prettify">&quot;Test {356*10}&quot;</span><span style=3D"color:#000=
" class=3D"m_9005655817011445617styled-by-prettify">_loc</span><span style=
=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettify">(</span><=
span style=3D"color:#080" class=3D"m_9005655817011445617styled-by-prettify"=
>&quot;Prod {0} OK!&quot;</span><span style=3D"color:#660" class=3D"m_90056=
55817011445617styled-by-prettify">,</span><span style=3D"color:#000" class=
=3D"m_9005655817011445617styled-by-prettify"> </span><span style=3D"color:#=
080" class=3D"m_9005655817011445617styled-by-prettify">&quot;fr&quot;</span=
><span style=3D"color:#660" class=3D"m_9005655817011445617styled-by-prettif=
y">)</span><span style=3D"color:#000" class=3D"m_9005655817011445617styled-=
by-prettify"> </span><span style=3D"color:#660" class=3D"m_9005655817011445=
617styled-by-prettify">=3D=3D</span><span style=3D"color:#000" class=3D"m_9=
005655817011445617styled-by-prettify"> </span><span style=3D"color:#080" cl=
ass=3D"m_9005655817011445617styled-by-prettify">&quot;Prod 3.560,00 OK!&quo=
t;</span><span style=3D"color:#660" class=3D"m_9005655817011445617styled-by=
-prettify">;</span><span style=3D"color:#000" class=3D"m_900565581701144561=
7styled-by-prettify"><br></span></div></code></div><br>Only drawback is som=
e template bloat but this is probably acceptable cost.</code></div></div></=
blockquote></div></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">=
This is exactly the kind of thing I&#39;m aiming for, although I dont belie=
ve string conversion and concatenation to be the final solution - unless my=
 recall of benchmarks is out of date, streams are faster than string concat=
enation.</div><div dir=3D"auto"><br></div><div dir=3D"auto">This being said=
, similar ideas can be applied to utilise the fmt library, for example.</di=
v><div dir=3D"auto"></div><div dir=3D"auto"><div class=3D"gmail_extra"><div=
 class=3D"gmail_quote"><blockquote class=3D"quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><code=
></code></div></div></blockquote></div></div></div></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/CAC%2B0CCOSZHaTA%3DYPSDU8Add7mE_BYcYP=
RCmGW8TRPtZhdqL8Hw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAC%2B0CCOSZH=
aTA%3DYPSDU8Add7mE_BYcYPRCmGW8TRPtZhdqL8Hw%40mail.gmail.com</a>.<br />

--001a11c0327aba08bb0564cdfe15--

.
