http://d.puremagic.com/issues/show_bug.cgi?id=5127



--- Comment #1 from bearophile_h...@eml.cc 2010-10-28 16:34:23 PDT ---
Currently the best workaround for that limitation is to use a template
constraint:


void doubleit(T, int n, int m)(T[n] data, out T[m] result) if (m == n+n) {
    foreach (i, x; data) {
        result[i * 2] = x;
        result[i * 2 + 1] = x;
    }
}
void main() {
    int[4] v = [1, 2, 3, 4];
    int[8] r;
    doubleit(v, r);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to