
12 Oct
2006
12 Oct
'06
6:47 p.m.
On 10/12/06, Arkadiy Vertleyb <vertleyb@hotmail.com> wrote:
"Jeff Garland" <jeff@crystalclearsoftware.com> wrote
So a core goal of the library is that you can use super_string in some code and then seamlessly pass that instance to existing interfaces written in terms of std::string for zero cost.
Not exactly... the cost would be runtime -- to allocate a copy of the string. You wouldn't be able to pass anything other than "std::string" to "const std::string&" without copying it first, would you?
Anything derived from std::basic_string<char> would work too. Super String is: template<class char_type > class basic_super_string : public std::basic_string<char_type> So there would be no copies. -- Caleb Epstein