Boost logo

Boost :

From: Miro Jurisic (macdev_at_[hidden])
Date: 2005-03-18 15:17:24


In article <423B2D40.3060105_at_[hidden]>,
 Felipe Magno de Almeida <felipe.almeida_at_[hidden]> wrote:

> Stefan Seefeld wrote:
> > Sundell Software wrote:
> >
> >> On Fri, 18 Mar 2005 13:16:24 -0500, Miro Jurisic <macdev_at_[hidden]>
> >> wrote:
> >>
> >>
> >>> I believe that the question of why basic_string is not a suitable Unicode
> >>> abstraction has been answered adequately in this thread, but to
> >>> summarize: numerous basic_string methods would allow the client to
> >>> violate invariants set by the Unicode standard.
> >>
> >>
> >>
> >> The client would not be using the basic_string directly to manipulate the
> >> unicode character string, although he would have access to the
> >> basic_string. If the client chooses to shoot themselves in the foot, they
> >> can. But any operation on the string as a string of characters would be
> >> done through another interface.
> >
> >
> > So what's the advantage of using std::basic_string over, say, std::vector ?
>
> reference counting optimization and maybe others, where there is.

Reference counting optimization is widely understood to be make performance of
multi-threaded code worse than some other implementations of basic_string. Can
name some other reason why basic_string would be a good rep for Unicode strings?
I can't think of any.

meeroh


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