On Friday, 26 July 2013 at 14:46:23 UTC, bearophile wrote:
import std.range, std.algorithm;
void main() {
    char[5] arr;
    auto r = 5.iota.map!(i => cast(char)(i + 'a'));
    static assert(is(typeof(r.front) == char)); // OK
    r.copy(arr[]); // error
}

Not possible, front is 'dchar' for char arrays:

import std.array;
void main()
{
        char[5] arr;
        pragma(msg, typeof(arr.front));
        // dchar
}

Reply via email to