Boost logo

Boost :

Subject: Re: [boost] Result of boost::split against empty string changed in post-1.45 release
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-06-16 17:23:57


On Sat, Jun 16, 2012 at 10:03 PM, Pavol Droba <droba_at_[hidden]> wrote:
> And actually the rationale behind it is quite simple. Imagine that you
> are parsing a CSV file. You need to get the exactly same number
> of elements regardless whether the last token is empty or not.
>
> It is much easier to remove the empty tokens than to guess whether
> they were supposed to be in the result or not.
>
> On the other hand, you are right, the documentation should be more
> explicit.

It's not about that, is it? It's about the case where the input is empty.

-- 
Olaf

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