Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-05-18 13:30:19


Is there any interest in the ability to generate a basic_string compliant
interface from a base set of functions in a similar way that the iterator
adaptors work?

I am currently developing a fixed-capacity string class that complies to the
basic_string interface and have at least 3 variants:

   boost::fixed_string< n, CharT = char, StringPolicy = std::char_traits<
char > >
   boost::char_string
   boost::wchar_string

where fixed_string derives from boost::char_string or boost::wchar_string
depending on CharT. It may be useful to implement these like this:

   struct char_string: boost::basic_string_impl< char_string >
   {
      // ...
   };

   void myfn( char_string & s )
   {
      // manipulate s like a basic_string or apply C-string functions
   }

So the question is this: are other people interested in this concept, or is
it better placed as an implementation detail?

Regards,
Reece

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk