|
Boost : |
Subject: Re: [boost] [string] proposal
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-01-27 11:23:53
On Thu, 27 Jan 2011 22:56:13 +0800
Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
>>> [...] Actually, what std::copy requires is an iterator to model the
>>> OutputIterator concept. This means, std::back_inserter would somehow
>>> be analogous to std::ostream_iterator<>, and while we're at it, you
>>> build strings with a "stream" instead of modifying an already
>>> created string. :)
>>
>> In other words, essentially the same as using a mutable buffer, then
>> copying the data to an immutable string. I'll be interested in the
>> code you propose for it.
>>
>
> Actually, it won't be a copy. :)
>
> If the mutable buffer was a sequence of reference-counted fixed-sized
> blocks, then you can imagine building an istring that just referred to
> these reference-counted fixed-sized blocks. [...]
Ahh... I'm starting to warm to the idea. You've obviously put some
thought into it.
>> The "istring" you mentioned in a later message is good enough for
>> this discussion, though it might not be descriptive enough for a
>> final name.
>
> I agree. Help wanted on a better name for the immutable string. :)
What about immutable::string? You'll probably need a namespace to put
the supporting code into anyway.
-- Chad Nelson Oak Circle Software, Inc. * * *
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk