Boost logo

Boost :

Subject: Re: [boost] Variadic append for std::string
From: Billy O'Neal (VC LIBS) (bion_at_[hidden])
Date: 2016-12-27 12:25:34

Pretty please?

Also concat(stringy_things...)

From: Boost <boost-bounces_at_[hidden]> on behalf of Olaf van der Spek <ml_at_[hidden]>
Sent: Tuesday, December 27, 2016 6:47:33 AM
To: boost_at_[hidden]
Subject: [boost] Variadic append for std::string

[This is one of the first messages you've received from ML_at_VDSPEK.ORG. Learn how we recognize email senders at]


One frequently needs to append stuff to strings, but the standard way
(s += "A" + "B" + to_string(42)) isn't optimal due to temporaries.
A variadic append() for std::string seems like the obvious solution.
It could support string_view (boost and std), integers, maybe floats
but without formatting options..
It could even be extensible by calling append(s, t);

append(s, "A", "B", 42);

Would this be useful for the Boost String Algo lib?

Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at