>> Asger Alstrup Nielsen writes:

  >> After reading it, the idea makes indeed sense. But this means
  >> that we will disallow all compilers where C++ string is not good
  >> enough (gcc 2.7.x and even 2.8.x currently, not too mention
  >> probably many proprietary compilers).

  AAN> Maybe we have to build our own standard string and wstring
  AAN> implementations and ship these along? We already have much of

We already have the string implementation, LString in 1.1 is a
standard string (infunctionality not in implementation), I only know
of two major missing things: some funcs returning iterators return
wrong value, and reverse iterators is missing.

  AAN> the string implementation in LString, and then doing wstring
  AAN> would be a question of search/replace. Allan and Lgb seem to be
  AAN> working from time to time on the LString to make it standard
  AAN> comformant. They should continue this work.

To make it work for char_traits too involves a lot of more work (to
get wchar working.) Personally I don't think we should put too much
effort into making this. (imo wasted effort) Of course it is a problem
that only some compiles have woring standard libraries. However this
is likely to be a temporary problem only, at lot of c++ compiles has
been updated to near standard conforming. and they continue to get
closer. IMHO we should use gcc until impossible to use it anymore and
then require a compiler that is as standard compilant as egcs.

  >> The code looks pretty good and is certainly more ambitious that
  >> what I would have done. However, I like it.
  >> 
  >> A few random thoughts:
  >> 
  >> - should we bother to ensure that we always use unsigned chars?
  >> I'm not sure myself, so I just ask.

  AAN> No. The only reason we should do this is to make "comparing"
  AAN> safe in the 8-bit sense. However, comparing is NOT stable in an
  AAN> encoded environment. In one encoding, the glyphs are sorted in
  AAN> one way, while in another encoding, the same glyphs might be
  AAN> sorted completely different. Therefore, we need to make sure
  AAN> that we only sort glyphs using Unicode. Specifically, I imagine
  AAN> that as part of the StringTools package that is available for
  AAN> all strings, we should provide an in-place sorting method:

  AAN> void sort(vector<string const &> & list, Encoding const &
  AAN> encoding);

that is supplied with stl by unisng function objects.

        Lgb

Reply via email to