Boost logo

Boost :

Subject: Re: [boost] Variadic append for std::string
From: Christof Donat (cd_at_[hidden])
Date: 2017-01-19 09:14:55


Am 19.01.2017 14:53, schrieb Richard Hodges:
> and the start of an idea...
> join(wrapped_sequence(range, "[", "]", ",", " ")) -- results in
> "[ a,
> b, c ]" or "[ ]" if the sequence is empty.
> The last one would allow automatic generation of JSON...

I think, that is a great Idea. Maybe we'd prefer a more ranges like api

join(separator(', '), range | wrapped("[", "]"));

The ranges expression then of course returns a range of string
factories. Just the first one and the last one do more than just pass
through to the unterlying type.


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