Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-01-21 14:18:30


At Sat, 22 Jan 2011 01:56:36 +0800,
Dean Michael Berris wrote:
>
> On Sat, Jan 22, 2011 at 1:37 AM, Chad Nelson
> <chad.thecomfychair_at_[hidden]> wrote:
> > On Fri, 21 Jan 2011 20:07:51 +0800
> > Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
> >
> >> [...] Mostly I'm interested in seeing a string class that is:
> >>
> >> 1. Immutable. No if's or but's about it. I don't want a string to be
> >> modifiable. Period. You can create it, and once it's created, that's
> >> it. [...]
> >
> > I'm confused by this. You want the basic type to always act as if it's
> > const, with no way to modify the string at ALL after it's been created?
> >
>
> Yep.
>
> No changing arbitrary content in the string. Concatenation is a
> process of creating new strings.

But you're allowing assignment. That's not acting "as if it's const,
with no way to modify the string"

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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