Mentioning that a container is not a range.

This commit is contained in:
Ferdinand Majerech 2015-01-24 17:08:33 +01:00
parent 3da26bc24d
commit 33261628ea

View file

@ -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))