Boost logo

Boost :

Subject: Re: [boost] [gsoc] Request Feedback for Boost.Ustr Unicode String Adapter
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-18 21:05:46


on Sat Aug 13 2011, Soares Chen Ruo Fei <crf-AT-hypershell.org> wrote:

> Ahh I see so that's quite nasty, but actually it still can be done
> with the sacrifice on efficiency. Basically since the iterator already
> has the begin and end boundary iterators it can simply reiterate all
> over from the beginning of the string. Although doing so is roughly
> O(N^2) it shouldn't make significant impact as developers rarely use
> this multi-byte encoding and even seldom use the reverse decoding
> function.

What you're describing is *not* a bidirectional iterator. Efficiency
guarantees (e.g. --p is O(1)) are part of the concept requirements.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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