Robert Jacques wrote: > On Sat, 02 May 2009 03:39:27 -0400, Rainer Deyke <rain...@eldwood.com> > wrote: >> You can have non-copyable value types, but they can't be containers. > > No they don't. Iteration can often be destructive. If I iterate over a > stack or a queue, I'm left with an empty stack/queue. For value > semantics to work non-destructive copying is required.
OK. I grant that there are non-copyable types that can reasonably be called containers. Simple solution: make them non-copyable structs. You still get most of the benefits of value types: - One less layer of indirection. - No long distance dependencies. - RAII. -- Rainer Deyke - rain...@eldwood.com