
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@gmail.com> wrote:
On Fri, 21 Jan 2011 20:07:51 +0800 Dean Michael Berris <mikhailberis@gmail.com> 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