Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2004-10-21 18:02:34


Erik Wien wrote:
> "Miro Jurisic" <macdev_at_[hidden]> wrote in message news:macdev-
>
>>I am not sure I buy this. I think that if you want to have unchecked
>>Unicode
>>data, you should use a vector<char*_t>. Unicode strings have well-defined
>>invariants with respect to canonicalization and well-formedness, and I
>>think
>>that the a Unicode string abstraction should enforce those invariants.
>>
>>Having intermediate states that are invalid and a final state that is
>>valid is
>>not a feature, it's a bug. It's a silent failure that I want to know
>>about.
>
>
> Amen. ;)
>

No fair bringing religion into this. ;-) I'll repeat what I said before
-- this would be an unfortunate design, and you'll hear about it from
your users. If you force people to do their bit twiddling in
vector<char*_t>, then you impose an extra allocation and a copy to get
it into a unicode::string, and most people won't bother.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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