RFC: naming for FrontTransversal and Transversal ranges

Rainer Deyke rainerd at eldwood.com
Sat May 2 12:17:04 PDT 2009


Robert Jacques wrote:
> On Sat, 02 May 2009 03:39:27 -0400, Rainer Deyke <rainerd at 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 - rainerd at eldwood.com



More information about the Digitalmars-d mailing list