diff --git a/src/containers/dynamicarray.d b/src/containers/dynamicarray.d index ae84d14..a76774e 100644 --- a/src/containers/dynamicarray.d +++ b/src/containers/dynamicarray.d @@ -296,7 +296,7 @@ struct DynamicArray(T, Allocator = Mallocator, bool supportGC = shouldAddGCRange static if (is(T == struct) && (hasElaborateAssign!T || hasElaborateDestructor!T)) { foreach (i; l..n) - emplace(arr[l], value); + emplace(arr[i], value); } else arr[l..n] = value;