"Bjarke Roune" <[EMAIL PROTECTED]> writes:

| Hmm... I don't understand why std::string is so much worse. Is it solely
| because it is a template, and some compilers can't handle those as well as
| non-templates?

likely.

| It would seem the ideal place to fix this would be on the compiler side or
| the standard library side, though that probably won't happen tomorrow.

gcc 3.x is getting closer all the time...

| If non-standard-library-provided string must be used, why not take it from
| some standard library, de-templatize it (search/replace T char, fetch a
| little stuff the class migth use from other files) and use it as a drop-in
| replacement for std::string.

This is exacly what lyxstring is. (except that we wrote all of it
ourselves, we didn't rip it from anywhere)

| probably without bugs (I think I saw someone report a bug in lyxstring the
| other day).

Yes, the first one in several months (if not even years).

| If there are any, other people will fix them, or the class could
| just be taken from another standard library. It is certain that the provided
| string will work exactly like a std::string would. If at some time,
| providing a non-template string becomes unnecessary for whatever reason,
| just remove it and the asserts will still be there.
>
| Hmm... I must admit I don't have much experience working with large
| programs. This seems to me to be an improvement in any case, though. Of
| course, this is all assuming that the bloat is in fact only caused by
| std::string being a template.

also by that it is really standard conformant, not like lyxstring that
only tries to get as close to conformant as practical.

-- 
        Lgb

Reply via email to