
In article <b3f2685905031806482a425a55@mail.gmail.com>, Sundell Software <sundell.software@gmail.com> wrote:
Looking at the code, it seems to duplicate alot of what basic_string does. AFAIK, though i haven't looked that close at unicode, you have two ways of viewing the string. As a string of UTF-* elements(?) and the other as a string of characters. The former has the same properties as basic_string, the latter doesn't.
It seems to me then, that a possible design would be to make it a basic_string and provide special iterators etc that views the string as characters. This would require the iterator to have a reference to the basic_string to be able to support assignment. Maybe it would require whole wrapper class around basic_string to provide the required functionality.
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. meerohj