RFC: naming for FrontTransversal and Transversal ranges

Robert Jacques sandford at jhu.edu
Sat May 2 01:18:04 PDT 2009


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

> Robert Jacques wrote:
>> On Fri, 01 May 2009 15:37:56 -0400, Rainer Deyke <rainerd at 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.




More information about the Digitalmars-d mailing list