From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-07-06 12:14:27
"Martin Wille" wrote:
> So if we add the suggested super string then PLEASE
> do not name it 'string', but 'string_builder' or 'string_buffer' in
> order to emphasize on the in-place modification aspect in the name. Of
> course, there should be a complement to string_builder:
> immutable_string. (ISTR there was a proposal for that, already).
One posibility is to use Boost.Const String
(should be sitting somewhere in review queue) so that:
super_string<char, std::basic_string<char> >
would provide mutable interface and
super_string<char, boost::const_string<char> >
would be limited to immutable operations.
The const_string variant may also avoid the basic_string overhead.