
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/

From: "Reece Dunn" <msclrhd@hotmail.com>
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?
While I don't have a present need for it, there has been discussion of various types of strings including ropes and small string optimized on the list. A utility such as you've proposed would make writing them easier. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
participants (2)
-
Reece Dunn
-
Rob Stewart