
19 Aug
2011
19 Aug
'11
1:05 a.m.
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