Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Xpressive
From: Eric Niebler (eniebler_at_[hidden])
Date: 2014-08-13 19:18:37


On 8/11/2014 5:27 AM, Goran wrote:
> Hi all,
>
> I'll have to check large CSV text files (up to several GB) and check
> them with Xpressive.
>
> As far as I can see, the only way to do is to load the whole file into
> a std::string and hand over to Xpressive. I don't want to do that
> because my files are too big.
>
> So, how can I open a CSV file in text mode, get bidirectional
> iterators and hand them over to Xpressive?

The question isn't really specific to xpressive. xpressive will work
with any bidirectional iterators. The hard part is implementing a
bidirectional iterator that pages in sections of a text file on demand.

I'm not aware of such a beast in Boost. If I were to implement one, I'd
probably start by looking at the existing support for memory mapped
files in Boost.Interprocess.

Good luck.

-- 
Eric Niebler
Boost.org
http://www.boost.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net