|
Boost : |
From: Rob Stewart (stewart_at_[hidden])
Date: 2004-10-22 11:43:51
From: Rogier van Dalen <rogiervd_at_[hidden]>
> <eric_at_[hidden]> wrote:
> >
> > -- 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.
>
> What frequent use cases do you see where people will want to change
> bits rather than work with characters?
It is easy to build a safe interface atop a fast one, but you
can't do the reverse. Perhaps the normal Unicode string, the
safe one, can be implemented using the lower level one. Then, as
someone mentioned, you can use the likes of c_str() to get a copy
of the low level string. (You'll want to be able to convert from
and assign from the low level string, too.)
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk