From: David Abrahams (dave_at_[hidden])
Date: 2006-09-28 14:55:13
"Eric Niebler" <eric_at_[hidden]> writes:
> Also an interesting question is how to get the type system to enforce
> the immutability of a type. If there is a type which is inherently
> immutable (because it is empty, for instance), we have two options:
I guess I don't get what you're trying to accomplish here. If it's
inherently immutable, the compiler is enforcing immutability no matter
what you do. IOW, there's no available interface through which you
can mutate instances. That's just what adding const to a well-behaved
mutable type does: makes all mutating operations unavailable.
What am I missing?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk