On Sun, Nov 7, 2010 at 4:32 PM, Eric Niebler <eric@boostpro.com> wrote:

On 11/6/2010 4:58 AM, Alex Dubov wrote:
> Eric Niebler <eric <at> boostpro.com> writes:
>> On 11/5/2010 10:21 AM, Dominique Devienne wrote:
>>> On Fri, Nov 5, 2010 at 3:31 AM, Alex Dubov <oakad <at> yahoo.com> wrote:
>>>> So the question is, how can one establish the size for this iterator adapter's
>>>> internal storage so as to avoid match failures due to incomplete storage and
>>>> avoid storing too much unnecessary data?
>>>
>>> In the case of single-line matching, backtracking need only going back
>>> to the start of the current line, so I think the buffering only needs
>>> to be line based. For arbitrarily long multi-line matching, I don't
>>> know... --DD
>>
>> In that case, the iterator may be backed up all the way to the beginning
>> of the match, so if the iterator is caching the input, it would need to
>> cache it all.

like I said, if your stream is like a file stream, then you
can manipulate the underlying buffers to give you a sliding window,
paging data in and out as needed.

Once upon a time, the Serialization library came with backtracking input iterators used to parse XML input files with Spirit. I briefly glanced over more recent Serialization documentation without spotting them. Do they still exist?