diff --git a/std/container/array.d b/std/container/array.d index f4da28f47..294c22de9 100644 --- a/std/container/array.d +++ b/std/container/array.d @@ -36,6 +36,12 @@ This means that pointers to elements of an $(D Array) will become dangling as soon as the element is removed from the $(D Array). On the other hand the memory allocated by an $(D Array) will be scanned by the GC and GC managed objects referenced from an $(D Array) will be kept alive. + +Note: + +When using $(D Array) with range-based functions like those in $(D std.algorithm), +$(Array) must be sliced to get a range (for example, use $(D array[].map!) +instead of $(D array.map!)). The container itself is not a range. */ struct Array(T) if (!is(Unqual!T == bool))