Friday, December 12, 2008

simple_string evolution

I'm finally putting some time into getting stlsoft::(basic_)simple_string finished - it's only been, er, 6 years. :$

Anyhow, here's the thinking:
  1. Round out all the currently-missing std::basic_string equivalency methods, so that it can act as a full functional replacement
  2. Define its purpose. This is something that has confused STLSoft users over the years.
  3. Provide compile-time selection of its nature, facilitating user-selected customisations of its implementation
The second point can be expressed as two main notions:
  • It has a documented footprint, equivalent to a single char*, which is consistent across platforms/architectures/operating systems, allowing, for example, a user to pass a std::vector<stlsoft::simple_string> to a function taking an array of C-style strings
  • It is, in some circumstances, more efficient than std::basic_string. Please note that superior efficiency is not a main design feature of the component, nor is it claimed in any general sense.
These changes will be included in forthcoming alpha releases of STLSoft 1.10.

No comments: