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...)

Billy3
________________________________
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 http://aka.ms/LearnAboutSenderIdentification]

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
_______________________________________________
Unsubscribe & other changes: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.boost.org%2Fmailman%2Flistinfo.cgi%2Fboost&data=02%7C01%7Cbion%40microsoft.com%7Ce8f9415a3f87491e848d08d42e675b57%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636184468831322908&sdata=wqjhaHLHfaeV0rw9xGlLdY2zHIWLtZdnew%2FwP%2F%2Fyf7A%3D&reserved=0

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk