== Quote from Denis Koroskin ([email protected])'s article > IIRC, it was discussed before and the following solution was suggested: > T[] toArray(T)(T[] values...) > { > return values.dup; // not sure why dup is needed here, but DMD2.039 > complains about escaping reference
When using this kind of variadics, an implementation is allowed to allocate the array on the stack for performance. Therefore, you were trying to escape references to a stack-allocated array.
