|
Boost : |
Subject: [boost] Variadic append for std::string
From: Olaf van der Spek (ml_at_[hidden])
Date: 2016-12-27 09:47:33
Hi,
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?
-- Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk