Steve Teale wrote:
enforce() will never be disabled.

As an aside, I just realized I haven't implemented put for strings yet,
and also that I'd promised a check in this weekend.


Andrei

Actually, thinking about this overnight, I'm a bit unhappy about giving the impression that a built-in array can serve as an output range. It really isn't true unless you never want to see the output again. If you do, some data structure is required, either a loose combination of an array and an unprotected reference to its original state (arrays a and b), or something more explicit like:

struct arrayOutputRange(T)
{
    T[] array;
    uint pos;

    this(uint sx) { ... }
    void put(T val) { ... }
}

Steve


copy(source, target) does make sense for arrays as output ranges. Since target is passed by value, your copy will see what's been copied.

Andrei

Reply via email to