Subject: Re: [boost] [regex] How robust are the<boost/regex/pending/unicode_iterator.hpp> adapters?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-07-25 07:43:29
On 23/07/2011 19:44, John Maddock wrote:
>>> Actually, I'm thinking that the fix may be easier than I thought after
>>> all -
>>> if I add a 2-arg "range-checked" constructor as an overload, then the
>>> iterator's constructor can validate the end-points of the underlying
>>> sequence during construction,
>> Doesn't that make construction of an iterator over N bytes an O(N)
> No, it only checks that each *end* of the sequence contains a valid
> multibyte sequence - effectly these can then act as sentinels - if there
> are invalid sequences within the range (not at the endpoints) then we
> can catch these anyway already.
That requires the underlying iterator to be bidirectional, right?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk