Boost logo

Boost :

Subject: Re: [boost] Variadic append for std::string
From: Olaf van der Spek (ml_at_[hidden])
Date: 2017-01-03 08:20:17


On Tue, Jan 3, 2017 at 2:19 PM, Christof Donat <cd_at_[hidden]> wrote:
> Hi,
>
> Am 01.01.2017 00:21, schrieb Andrey Semashev:
>>
>> throw std::runtime_error(format(std::string()) << "Error " << 47);
>
>
> How would that differ from
>
> throw std::runtime_error((std::ostringstream{} << "Error " << 47).str());

Simpler syntax, better performance

-- 
Olaf

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