On Sat, 02 May 2009 03:39:27 -0400, Rainer Deyke <rain...@eldwood.com> wrote:

Robert Jacques wrote:
On Fri, 01 May 2009 15:37:56 -0400, Rainer Deyke <rain...@eldwood.com>
wrote:
All containers need to support copying.

No they don't.

There is no conceptual problem with a non-copyable struct.  However, in
order to be a considered a container, the struct must at least support
read-only iteration over its contents.  If iteration is possible, then
so is copying.

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.

Reply via email to