14 Apr
2014
14 Apr
'14
1:18 p.m.
First of all I think it's a bit unintuitive that boost::algorithm::split swaps with target, I would've assumed it appended. The fact that it in effect clears target makes it cumbersome to incrementally split into a destination, as you need a new temporary for every call to split, and then explicitly transfer everything over to your final destination. The docs do mention the behavior as a note ( which I presume is precisely because it's a bit unintuitive ). My question then naturally becomes why does split behave like this? As changing the behavior would be a breaking change, do you think it would be unreasonable to have a split_append? Kind regards, Sebastian Karlsson