
In article <423B2D40.3060105@ic.unicamp.br>, Felipe Magno de Almeida <felipe.almeida@ic.unicamp.br> wrote:
Stefan Seefeld wrote:
Sundell Software wrote:
On Fri, 18 Mar 2005 13:16:24 -0500, Miro Jurisic <macdev@meeroh.org> 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